Leo Komarov, Oliver Wahlstrom, Anthony Beauvillier and Mathew Barzal scored, and Brock Nelson and Scott Mayfield each had two assists for the Islanders. Coming off three straight losses to first-place Washington, they won for the third time in eight games (3-4-1) to remain one point ahead of fourth-place Boston in the East Division.
''The locker room's buzzing right now,'' Wahlstrom said. ''That's a really big win for us. We're grinding a little bit for the past week and just to see everyone smiling again and put on two inches, that was awesome. It's a big win for sure.''
Varlamov had seven saves in the first period, 10 in the second and eight in the third for his 33rd career shutout and fourth win in five starts against the Rangers this season.
''It was a big game and we did an outstanding job defensively,'' Varlamov said. ''We didn't give up many chances. They had a couple of power play opportunities. We defended our net really well. I got to give credit to the team.''
Varlamov became the first goalie to shut out the Rangers three times at Madison Square Garden in one season.
''I like to play at Madison Square Garden,'' Varlamov said. ''Every time I play here it's very special to me. There's a lot of history in this arena. ... Every time I play here I try to have fun.''
Igor Shesterkin finished with 23 saves, falling to 0-4-1 in five starts against the Islanders.
The Rangers, who had won three straight and seven of the their last nine, fell six points behind the Bruins for the final playoff spot in the East. The Rangers have five games remaining and Boston has six - including two against each other.
''They were just on top of us,'' Rangers defenseman Adam Fox said. ''They were moving a little quicker and cycling the puck real well and keeping us in the D zone. It was definitely tough to get odd-man chances or really second-chance opportunities, so credit them for that.''
The Rangers and Islanders meet again Saturday night at Nassau Coliseum.
With the Rangers on a power play trailing 3-0, they pulled Shesterkin for a 6-on-4 advantage with about 7 minutes left. Barzal came out of the penalty box, picked up a loose puck and scored into an empty net with 5:34 left for his 14th.
''There's a lot to like about (the game),'' Islanders coach Barry Trotz said. ''We were connected in all three zones. We just stayed with it. I liked the fact we didn't deviate the whole game and we were hard to play against. It was probably frustrating for them, and it was our game.''
Beauvillier pushed the Islanders' lead to 3-0 at 1:03 of the second period as he got a pass from Scott Mayfield, skated back into the right circle and fired it past Shesterkin for his 11th.
Varlamov made a nice glove save on rookie Vitali Kravtsov with 3:16 left in the second to keep the Rangers off the scoreboard.
Komarov gave the Islanders a 1-0 lead with his first goal of the season. Nick Leddy brought the puck up the left side, passed to Jordan Eberle by the side boards, and Eberle sent a pass across to to Komarov, who quickly fired it past Shesterkin from the right faceoff dot 6:27 into the game.
With the Islanders on their second power play of the game, Wahlstrom got a pass from Nelson, skated between the circles and fired it past Shesterkin with 7:21 left in the opening period to make it 2-0. It was Wahlstrom's 10th of the season and first since March 25 at Boston.
''It was obviously nice,'' Wahlstrom said of his goal. ''The most important thing is just this win. Yeah, it's awesome I scored a goal but the win was just special for this room and everybody involved. I think we just carry on from this and get our game back to where it should be.''
SHESTERKIN GETS THE NOD
Shesterkin got the start in goal even though backup Alexandar Georgiev had a 9-2 record with a 1.70 goals-against average in nine career games against the Islanders. Rangers coach David Quinn pointed to Shesterkin's strong play since returning from an injury in late March - he was 9-4-2 with a 2.51 GAA in that stretch coming in - as the deciding factor.
LINDGREN SHAKEN UP
Rangers defenseman Ryan Lindgren was shaken up after hitting the side boards hard while making a hit on the Islanders' Cal Clutterbuck 4 1/2 minutes into the third period. Lindgren was down on the ice for several minutes before being tended to and helped off the ice.
Rangers defenseman Jacob Trouba missed his fifth straight game due to an upper body injury sustained from a hard hit by the Islanders' Matt Martin in the teams' last meeting on April 20. Trouba took part in the Rangers' morning skate and Quinn said he is ''getting close'' and is day-to-day.
The Rangers were also without forward Chris Kreider, who missed the morning skate for ''maintenance'' and was a game-time decision.
Barzal was fined $2,000 by the NHL as a supplementary discipline for diving/embellishment early in the second period of the Islanders' game against Washington last Thursday night. He was not penalized for the play during the game. It was the second time he was cited for the infraction. As per the collective bargaining agreement, he was issued a warning after a game against the Flyers on Jan. 30. The fine goes to the NHL Players' Emergency Assistance Fund.
More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.