Mika Zibanejad of the Rangers, right, celebrates his game-winning goal on the power...

Mika Zibanejad of the Rangers, right, celebrates his game-winning goal on the power play at 17:00 of the third period against the Devils and is joined by Artemi Panarin, Chris Kreider and Ryan Strome at the Prudential Center on Sunday in Newark, N.J. Credit: Getty Images/Bruce Bennett

The day after Pavel Buchnevich became the first Rangers player to score a hat trick on his birthday, Mika Zibanejad came up just as huge on his birthday. The now-28-year-old Zibanejad scored a power-play goal with three minutes remaining to break a tie and give the Rangers a desperately needed 5-3 victory over the Devils on Sunday in Newark.

The Rangers swept the four-game series and kept pace with Boston in the playoff race after the Bruins beat the Washington Capitals, 6-3, earlier in the day. The Rangers (23-16-6, 52 points) trail the Bruins, who hold the fourth and final playoff spot in the East Division, by four points, and Boston has two games in hand.

Alexandar Georgiev made 25 saves for the Rangers. He left the game late in the first period with an injury but returned to start the second.

The Rangers shut out the Devils in the first two games Tuesday and Thursday but found things a lot tougher over the weekend. After taking a 4-0 lead on Saturday, they gave up three goals before getting two empty-netters for a 6-3 win. They took a 3-0 lead on Sunday but allowed the Devils to tie it at 3-3 in the third period before Zibanejad’s goal saved them.

"I know I’ve said this throughout this whole thing, and it wasn’t just coach talk. [Last-place] Buffalo just beat Pittsburgh today, so these are not going to be easy games,’’ Rangers coach David Quinn said. "And when you’ve got players in a lineup like New Jersey has, who are trying to carve out a career, playing with the effort they do and the way they compete, it’s gonna make life hard for people.

"[But] playing a team four times in a row and you come up with four wins, I don’t care what it looks like,’’ he said. "I don’t care how many leads you blew. I don’t care. It doesn’t matter. It really doesn’t. You find ways to win, and that’s what we did.

"We certainly understand that if we’re going to have success, we’ve got to play better. And we know that.’’

Third-period goals from rookie Marian Studenic and captain Nico Hischier had tied it when the Devils’ Ryan Murray was penalized for high-sticking Kaapo Kakko with 4:10 remaining. Zibanejad took a pass from Ryan Strome in the slot and lifted a shot over MacKenzie Blackwood’s right shoulder for his 16th goal of the season to give the Rangers a 4-3 lead.

Strome was credited with an empty-net goal at 19:35 when he was hooked from behind by P.K. Subban on a breakaway with the Devils’ net empty.

The Rangers led 2-0 after the first period on a power-play goal by Chris Kreider and the first NHL goal by rookie Vitali Kravtsov, who one-timed a pass from Brett Howden from below the right circle faceoff dot past Blackwood at 14:03.

Alexis Lafreniere made it 3-0 when he drove the net and took a pass from Filip Chytil in his skates, kicked it up to his stick and backhanded it under Blackwood at 5:17 of the second period. Devils defenseman Matt Tennyson checked Lafreniere into Blackwood and into the net on the play, but everyone was OK and the goal counted.

The Devils got on the board at 18:55 of the period when Mikhail Maltsev backhanded in the rebound of a slap shot by Subban for his fifth goal of the season. That helped give the Devils some momentum.

In the end, though, Zibanejad’s goal saved the Rangers.

"It’s hard, obviously, when you go up, we get that lead [and give it up],’’ he said. "So it’s something we have to talk about moving forward. But all I care right now about is the two points that we got.’’

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME