NEW YORK -- Josh Bailey scored with 1:26 remaining and the New York Islanders handed the New York Rangers their fifth straight loss, 4-3 at Madison Square Garden on Thursday.
Bailey scored on a one-timer in the slot off a pass from the right side by Cal Clutterbuck. It was the Islanders' first and only shot on goal of the third period. The Rangers had 14 at the time and finished with a 17-1 advantage.
"We found a way," Islanders coach Barry Trotz said. "One shot. Our shooting percentage is really good."
[WATCH: All Islanders vs. Rangers highlights]
Mathew Barzal had a goal and two assists, Anders Lee had one goal and one assist, Jordan Eberle scored and Robin Lehner made 27 saves for the Islanders (24-14-4), who have won seven of their past eight games and 10 of their past 12.
"You're going to have your moments where you're not at your best, but in those moments I think you see good teams around the League still find a way to win," Bailey said. "Tonight was an example of that."
Video: NYI@NYR: Barzal takes advantage of line change
The Rangers (17-19-7) got goals from Ryan Strome, Kevin Shattenkirk and Jesper Fast. Henrik Lundqvist made 16 saves in his 837th NHL game, which tied him with Hockey Hall of Fame member Jacques Plante for 12th on the NHL's all-time list for games played by a goalie.
"We've had some heartbreaking losses, but that's right up there at the top of the list," Rangers coach David Quinn said. "I was really proud of the way we played just in the third period. We weren't great in the first two.
"We battled through some things and to come out the way we did in the third period and play with the pace and the energy that we did says an awful lot about our character. But character isn't getting us wins right now."
Quinn said the Rangers, who haven't won since Dec. 31, would take Friday off so they can mentally regroup and refresh before playing the Islanders again on Saturday.
"Maybe if we were winning some games and this happened you can kind of move past it," Quinn said. "We've got to work hard at the mental aspect of this and move past this tonight. We cannot let this get in the way of our performance on Saturday. We can't let them win two games tonight."
Video: NYI@NYR: Fast swats home deflected puck
Strome gave the Rangers a 1-0 lead with a power-play goal on a one-timer from the left circle off a backdoor play at 1:38 of the first period. The lead lasted 53 seconds before Barzal scored on a breakaway to tie it 1-1.
The Islanders took a 2-1 lead with Eberle's power-play goal at 8:51 of the first.
Shattenkirk scored his second goal of the season, and first since Nov. 9, with a wrist shot from the right circle into the top left corner at 1:11 of the second period to make it 2-2.
The Islanders re-established the lead 1:57 later when Lee scored his 16th of the season and the Islanders' second power-play goal of the game on a deflection of Nick Leddy's shot at 3:08 to make it 3-2.
Video: NYI@NYR: Lee redirects Leddy's drive for PPG
Fast scored 8:40 into the third period to tie the game at 3-3. The Rangers maintained pressure, but Lehner saved the last 12 shots he faced, allowing Bailey a chance to score the winner.
"[The third] wasn't our best period, but it's really just about finding ways to win," Bailey said. "Just because you're not playing your best, doesn't mean the game has got to be thrown away. I think you still know that if we stick with it here, we might be able to find a way."
They said it
"It's two points in a league where I've been on teams that missed the playoffs by one point multiple times. Two points is two points. Sometimes all you need is a play to break through. They made a play to tie it and we end up making a play to win it. I think it just takes awareness that it's not your best and you've got to sit down tomorrow and go through why it wasn't your best. Then you've got to fix it because if you don't fix it, these wins turn into losses and that's when you start trending in the wrong direction." -- Islanders forward Cal Clutterbuck
"It's too bad. I thought we played really well, especially in the third. We really did. We worked hard, good energy, so that's a tough one." -- Rangers goalie Henrik Lundqvist
Need to know
Lehner has won his past eight games. ... It was Bailey's second goal in the past 20 games. … Barzal has 14 points (nine goals, five assists) in the past nine games. … Lee has a four-game point streak (two goals, four assists). … Rangers assistant coach Lindy Ruff was hit in the head by a puck in the first period. Ruff was OK and stayed on the bench.
Islanders: Host the New York Rangers on Saturday (Barclays Center; 1 p.m. ET; ESPN+, MSG+ 2, MSG, NHL.TV)
Rangers: At the New York Islanders on Saturday (Barclays Center; 1 p.m. ET; ESPN+, MSG+ 2, MSG, NHL.TV)
Video: Bailey's late winner leads Islanders past Rangers