NEW YORK -- The Pittsburgh Penguins moved closer to second place in the Metropolitan Division and ended a four-game losing streak with a 4-3 shootout win against the New York Rangers at Madison Square Garden on Friday.
The Penguins (47-19-11) are one point behind the Columbus Blue Jackets, who lost 3-1 at the Chicago Blackhawks.
"We've done some good things over the course of the year and played through a lot of different guys being out, so, yeah, it'd be nice to have that home-ice advantage [in the Eastern Conference First Round] and make it meaningful," Penguins captain Sidney Crosby said. "Hopefully we can keep going here. It's going to be a tight race."
Crosby and Phil Kessel scored in the shootout. The Rangers, who tied the game on Chris Kreider's 6-on-5 goal with 12 seconds left, didn't score a shootout goal.
WATCH: All Penguins vs. Rangers highlights
Crosby scored his NHL-leading 43rd goal of the season and had an assist on Jake Guentzel's goal. Crosby has 84 points, seven behind Edmonton Oilers center Connor McDavid for the League lead.
Video: PIT@NYR: Crosby slides home backhand to seal SO win
Bryan Rust scored, and Matt Murray made 30 saves for Pittsburgh, which lost its previous two games against the Philadelphia Flyers and Chicago Blackhawks by a combined 11-3.
"It's just that desperation level," Crosby said. "It's getting ready for playoff hockey and hopefully a win like this can kind of solidify the way we need to play and build on that toward the end of the year here."
The Rangers (46-26-6) fell behind 3-1 in the third period and lost their eighth straight home game (0-5-3). They haven't won here since Feb. 19.
New York is seven points behind Pittsburgh for third place in the division with four games remaining. The Washington Capitals lead the Blue Jackets by four points for first place. The Capitals lost to the Arizona Coyotes 6-3 on Friday.
Video: PIT@NYR: Rust goes five-hole to beat Lundqvist
Henrik Lundqvist made 32 saves, and Nick Holden and Rick Nash scored for New York.
"I thought [Lundqvist] had a real solid game and I really liked a lot of the things we did 5-on-5," Rangers coach Alain Vigneault said. "We're not going to be perfect. A team like [Pittsburgh] is obviously going to get some opportunities, but for the most part I thought we played well."
Rust gave the Penguins a 3-1 lead at 6:46 of the third period. Nash made it 3-2 at 8:50.
The Penguins took a 2-0 lead on goals by Crosby and Guentzel in the first 10:46 of the second.
Video: PIT@NYR: Nash bangs home deflected shot for nice goal
Guentzel scored 39 seconds into the period. Crosby swung from the left point down to the right post and got a cross-slot pass from Kessel. Crosby found Guentzel at the left post for a tap-in.
Crosby scored with a hard-angled shot that banked into the net off of Lundqvist.
"There's just a little bit of room there and sometimes if you get a piece of him you get a chance and it goes in," Crosby said. "Most times it doesn't. Fortunately it went in tonight."
Holden scored a power-play goal with 27 seconds left in the second to make it 2-1.
Video: PIT@NYR: Murray makes save with mask from his back
Goal of the game
Conor Sheary found Crosby behind the net. Crosby backed out of the trapezoid but was behind the goal line when he shot the puck off the back of Lundqvist's mask and into the net.
"He was shooting for my head," Lundqvist said. "It hit my head and I can't really stop it with my head. ... He surprised me. Not a lot of guys think of shooting at your head from there but he did, so give him credit."
Video: PIT@NYR: Crosby banks puck home from below goal line
Save of the game
The Rangers had a 2-on-0 late in overtime with Kevin Klein and Michael Grabner. Klein moved the puck to Grabner, but Murray came across the crease, right to left, and made a glove save.
"I just wanted to make up for that third [goal]," Murray said. "I just wanted to stop that one really bad."
Highlight of the game
Kreider's goal gave the Rangers one point. He scored on the second rebound after Holden's shot from the point. Murray stopped J.T. Miller on the first rebound.
Video: PIT@NYR: Kreider punches in rebound to tie game late
Unsung performance of the game
The Penguins didn't score on their three power plays but moved the puck well, generated chances and gained momentum from each one. Guentzel's goal came two seconds after their first power play expired.
Video: PIT@NYR: Guentzel caps off perfect passing play
They said it
"It's a game of inches, and especially with the lead we had and the way we were playing it didn't feel like we were giving them much, but they get a couple chances and they capitalize on it. They're a good team and we'll have to learn from it, but it's nice to get a win finally." -- Penguins center Sidney Crosby
Need to know
Rangers defenseman Ryan McDonagh missed the game with an undisclosed injury. He is day to day. ... Rangers rookie forward Jimmy Vesey was a healthy scratch for the first time.
Penguins: Host the Carolina Hurricanes on Sunday (5 p.m. ET; NHLN, ROOT, FS-CR, NHL.TV)
Rangers: Host the Philadelphia Flyers on Sunday (7:30 p.m. ET; NBCSN, NHL.TV)
Video: Murray, Crosby lead Pens past Rangers in shootout win