Updated

Brandon Dubinsky and Michael Sauer scored 51 seconds apart late in the third period, and the New York Rangers turned a likely crippling defeat into their most stirring victory of the season by rallying to beat the defensive-minded Boston Bruins 5-3 on Monday night.

The Rangers, who trailed 3-0 in the second period, seemed beaten by the Northeast Division champion Bruins when the game suddenly turned without warning. Dubinsky scored the tying goal with 3:48 remaining and Sauer followed at 17:03 with the winning tally that shook Madison Square Garden.

Derek Stepan sealed it with an empty-net goal with 52.2 seconds left. Vinny Prospal had two goals in the second period to start the Rangers' rally that might have saved their season.

New York won for the second straight day, beginning a season-ending, three-game homestand with a flurry. The Rangers jumped over idle Buffalo into a sixth-place tie with Montreal in the tight Eastern Conference playoff race. New York leads Buffalo by one point and ninth-place Carolina by four. Montreal, Buffalo and Carolina all have three games remaining to New York's two.

Daniel Paille and Nathan Horton scored first-period goals for the Bruins, who appeared on their way to closing within two points of Washington and Philadelphia atop the East. Chris Kelly scored his first goal since joining Boston to push the lead to three goals, but the Rangers didn't quit.

Even after Prospal's two goals made it 3-2, Boston settled the game down and shut off the Rangers' offense. But the Bruins recorded only 11 shots after putting up 19 in the first period.

Dubinsky tied it when Ryan Callahan sent a pass from the left-wing boards to him by the right post. He calmly shifted from forehand to backhand and scored his 24th.

Thrilled that the Rangers would likely get to overtime and pick up a key point, fans were still celebrating when Sauer sneaked a shot through goalie Tim Thomas from a tough angle. Bruins forward Michael Ryder was so frustrated, he slammed the puck off the end boards in disgust after it popped out of the net.

Thomas finished with 21 saves but fell to 4-1-1 in his last six outings. He had allowed a total of five goals in the previous five games.

Henrik Lundqvist stopped 27 shots for New York.

The Rangers boosted their playoff chances Sunday with a win at Philadelphia and moved closer to clinching a spot against the Bruins, who could be a first-round opponent.

Despite recording only four shots in the second period, the Bruins stretched their lead to 3-0 at 10:32 on Kelly's 13th of the season and first with the Bruins.

Prospal changed the mood in the arena when he cut the deficit to 3-1 just 1:02 after Kelly's goal. Momentum continued to shift in the Rangers' favor when David Krejci was sent off for slashing less than a minute later, but the Rangers' struggling power play failed to take advantage.

New York continued to press and Prospal beat Thomas again to make it 3-2 with 1:34 to go in the second. Prospal has eight goals this season in 27 games since returning from a knee injury — including three goals in three games.

Boston dominated the first period on the scoreboard, the shot counter and in overall territorial play. They outshot the Rangers 19-5 and built a 2-0 lead in front of a frustrated crowd.

Paille got the offense going when defenseman Johnny Boychuk slipped a pass through a maze of legs from the center of the right circle to him for a deft deflection from in front that beat Lundqvist with 4:44 left in the first period.

Horton struck 1:37 later when he backhanded in a rebound of Krejci's shot for his 25th goal.

NOTES: Kelly has scored a career high of 15 goals twice. He has two assists in 21 games with the Bruins since being acquired from Ottawa on Feb. 15. ... Five of the previous 14 meetings were 1-0 finishes — three won by the Rangers. ... Boston LW Shawn Thornton missed his third game after being severely cut on his face. He skated Monday morning and hopes to play Wednesday. ... The Rangers recalled C Kris Newbury from Connecticut of the AHL, but he was scratched. ... The Rangers were 0 for 4 on the power play and have scored only once in the past 23 chances.