In the final seconds of overtime, with the Rangers on the power play, Brad Richards would not have been faulted if he decided to shoot the puck. He had the hot hand, having already scored two goals to help carry the Rangers to overtime against the Islanders. But Richards chose to do what he does best. He passed the puck to Marian Gaborik, who scored with 5.8 seconds left to give the Rangers a 4-3 win over the Islanders on Sunday night at Madison Square Garden. “Richie made the perfect play,” Gaborik said. “He held the puck until just the right moment and set me up. What a great game he had.” Richards was also responsible for drawing the man advantage. Travis Hamonic was penalized for tripping Richards with 2 minutes 4 seconds left in overtime, and the Rangers needed almost every second to score on the power play. The win ended the Rangers’ losing streak at three and kept their lead at 4 points over Pittsburgh in the Eastern Conference. After scoring only one power-play goal in the previous eight games, the Rangers scored three Sunday in winning the season series over the Islanders, 4-1-1. John Tavares had a goal and an assist for the Islanders, but the night belonged to Richards. “You need different guys to step up every night,” said goaltender Henrik Lundqvist, who made 16 saves. He added that Richards “definitely led the way.” The Rangers did not have a lead in the game until Gaborik’s winning goal. Although they outshot the Islanders, 36-19, the Rangers had to come back from one-goal deficits three times. The Islanders did not take their first shot on goal until 10:55 into the game, but they scored the first goal 20 seconds later, when Tavares put in a rebound of a shot by P. A. Parenteau. The goal was the 28th of the season for Tavares, the first overall draft selection in 2009, who has emerged as a star in his third season in the N.H.L. With Tavares serving a penalty for hooking late in the first period, Richards tied the score with a one-man effort. Richards took the puck from Anton Stralman in the Rangers’ end and carried it down the center of the rink untouched. As he entered the Islanders’ zone, Richards fired a wrist shot high past goaltender Evgeni Nabokov with 1:13 to play for his 20th goal of the season. “The production sometimes doesn’t come, but I feel better seeing the ice,” Richards said. “Tonight, I got rewarded. It gets your confidence up.” At 3:57 of the second, Derek Stepan was given a four-minute penalty for high-sticking Parenteau. With 13 seconds left in the power play, Matt Moulson scored on a carom off Lundqvist from the side of the net to give the Islanders a 2-1 lead. Nabokov was called for high-sticking Brian Boyle in a skirmish around the Islanders’ net with five minutes to play in the second, and the Rangers took advantage. Boyle screened Nabokov on the power play, enabling Richards to fire in a slap shot to tie the score at 2-2. “Brian Boyle really makes that play,” Gaborik said. The 6-foot-7 Boyle said, “That’s my job — to get in the other goalie’s eyes.” Andrew MacDonald was called for holding with 2:43 left in the second period. As the penalty expired, the Rangers did not have a player back to cover MacDonald as he came out of the box. He took a pass from Tavares, broke in alone and wristed a shot past Lundqvist to break the tie with 36 seconds left in the period. During the second intermission, the Rangers talked about staying within their system and not being dejected about trailing by one goal. “We didn’t give them much,” Richards said. “Just a couple of bad bounces. We felt good, like we were controlling play.” Lundqvist said, “The puck just wasn’t bouncing my way.” With a smile, he said, “At least I had a strong third period.” The Rangers tied the score for the third time when Boyle deflected a point shot by Ryan McDonagh for a goal 3:29 into the third period. The Rangers were without Ryan Callahan, their captain, who sat out with a bruised foot. He was replaced in the lineup by Mats Zuccarello, the small but gifted forward from Norway who has been in the minors since October. Zuccarello was effective on the power play, getting an assist on Richards’s second goal. He was also one of the four players on the ice, along with Gaborik, Richards and Stepan — all forwards — for Gaborik’s game-winning goal. “Zuke is very creative out there,” Gaborik said. “He is very patient with the puck. He added a lot to our power play tonight.”