NEW YORK, N.Y. - Brock Nelson kept up his scoring touch, Nick Leddy got a key goal and Jaroslav Halak bested Henrik Lundqvist again. It all added up to another big win for the New York Islanders against the crosstown-rival Rangers.

Nelson and Leddy scored 2:24 apart early in the third period to rally the Islanders to a 3-1 victory over the Rangers on Thursday night.

Halak stopped 34 shots to beat Rangers goalie Lundqvist for the eighth straight time, including five wins with the Islanders.

"It's huge," Leddy said of the win. "It's a great measuring stick against a very good team. We have some things to work on, but I thought we played a very good game."

Kyle Okposo added an empty-netter with less than 2 seconds left to seal the Islanders' second straight win after consecutive losses to Washington and Philadelphia.

The Islanders, 9-3-2 in division play, won the teams' first meeting, 2-1 in a shootout here at the Barclays Center on Dec. 2.

Islanders coach Jack Capuano was pleased with his team's defensive effort in this one with the absences of injured defencemen Johnny Boychuk and Travis Hamonic.

"It was a gut-check for our team," Capuano said. "We played extremely hard against a good team. I thought our defence at times made a couple of mistakes but overall with Hamonic and Boychuk being out they picked up the slack.

"Fortunately our penalty kill was good tonight, our goaltender stood tall, and Leddy's goal was a big goal for us."

Marc Staal scored late in the second period for the Rangers and Lundqvist made 29 saves.

"I felt like I played my game," Lundqvist said. "I wish I felt better about it."

With the teams skating 4-on-4, Nelson tied the score 1-1 at 1:53 of the third with his 18th of the season and fourth in two games. With the puck in the offensive zone, Nelson was taken down by a Rangers player, got up and took a pass from Adam Pelech and wristed it past Lundqvist.

Leddy put the Islanders ahead when John Tavares skated from behind the net on the right side and sent a pass to Leddy. The defenceman wristed it into the top left corner at 4:17 with his second of the season.

The Islanders moved two points ahead of the Rangers for second place in the Metropolitan Division. The teams began the day 16 points behind first-place Washington and four ahead of fourth place New Jersey.

"It feels good, obviously, winning this game, but they have a good team and we have a lot of games left, same as they do," Halak said. "There's still a lot of points on the table. We just need to keep winning points every night, trying to keep getting better."

The game was tight for most of the first two periods before the Rangers finally broke through in the final minute of the second period. On a rush, Kevin Hayes had the puck down the right side, spun around and sent a centring pass that went off Chris Kreider's stick before Staal tipped it in on the left side for his second goal of the season and first in 36 games with 46 seconds to go.

"Both goaltenders played extremely well," Rangers coach Alain Vigneault said. "But in the space of 4 minutes (in the third period) we made two mistakes and it cost us."

The Rangers had a 14-10 advantage on shots in a scoreless first period, but the Islanders had some great chances.

Lundqvist stopped Leddy's slap shot through traffic from inside the blue line in the opening minute. The Rangers' goalie also had big saves on breakaways by Tavares and Cal Clutterbuck.

Calvin de Haan wristed a shot that Lundqvist stopped with his blocker and then gathered with about 8 minutes to go.

Kreider had a shot that rang off the right post early in the second period. The Islanders then controlled play for a large stretch, keeping the puck in the offensive zone, but couldn't get anything past Lundqvist.

NOTES: The teams' remaining two meetings will both be at Madison Square Garden, on March 6 and April 7. ... Nelson was coming off a four-point game in a win over Columbus on Tuesday night. ... The Rangers were without defenceman Dan Girardi (cut on right hand). ... Lundqvist made his 10th straight start. ... Boychuk is out with an upper-body injury and Hamonic with a lower-body injury. ... The Islanders' healthy scratches were Steve Bernier and Scott Mayfield.