NEW YORK -- A mostly quiet third period nearly cost the New York Islanders. It took just one shot by Josh Bailey to make up for it.
Bailey scored with 1:26 remaining — on the Islanders' first shot on goal in the period — to edge the Rangers 4-3 on Thursday night at Madison Square Garden.
"It was pretty ugly on our part," said Mathew Barzal, who had a goal and two assists. "We all know that, our coaches know that. ... It was a tough period, but it was obviously nice to get a goal there at the end."
Cal Clutterbuck found Bailey cutting to the back post, and he beat Henrik Lundqvist to help the Islanders improve to 13-2-0 in the last 15 meetings between the Big Apple rivals.
"We found a way," Islanders coach Barry Trotz said. "One shot, and our shooting percentage is really good."
Jordan Eberle and Anders Lee also scored for the Islanders, Johnny Boychuk had two assists, and Robin Lehner made 27 saves.
"We want to be peaking at the right time and playing our best hockey coming up here," Bailey said. "You're going to have your moments where you're maybe not at your best, but in those moments, good teams around the league find a way to win."
Ryan Strome, Kevin Shattenkirk and Jesper Fast scored for the Rangers, who dropped their fifth straight to open 2019. Lundqvist stopped 16 shots.
"We have a lot to compare it to because we've had some heartbreaking losses, but that's right up there," Rangers coach David Quinn said. "It might be at the top of the list."
Fast tied it 3-3 midway through the third period by knocking the puck out of the air and past Lehner. That came after Lee put the Islanders ahead 3-2 by redirecting Nick Leddy's slap shot on the power play early in the second period.
"Obviously, it's a tough one," Lundqvist said of the loss. "We played really well and put ourselves in a really good spot to win the game. I don't know what to say."
Strome, a former Islander, opened the scoring 1:38 into the game with a power-play goal, but Barzal answered just 53 seconds later with a nifty deke past Lundqvist. The speedy forward has been terrific against the Rangers, recording 14 points in seven games. Barzal will represent the Islanders at All-Star weekend in San Jose.
"He was good," Trotz said. "I thought he played the right way, he had the puck all night, lots of legs and all that. His line was really good. You look at the scoresheet and you can see his line and his linemates, that's where all the points are."
Eberle made it 2-1 five minutes later after mishandling a puck but recovering to snap a wrist shot by Lundqvist.
Shattenkirk tied it 2-2 when he scored his second of the season at 1:11 of the middle frame.
NOTES: Lundqvist appeared in his 837th career game, tying Jacques Plante for 12th place on the NHL's career list. ... Rangers F Kevin Hayes missed his fourth straight game with an upper-body injury. .... Rangers scratched Ds Tony DeAngelo and Brendan Smith. ... Islanders scratched Fs Michael Dal Colle and Tom Kuhnhackl along with D Lucas Sbisa.
Rangers: Visit Islanders on Saturday
Islanders: Host Rangers on Saturday.
More AP NHL: https://apnews.com/NHL and https://twitter.com/AP—Sports