TORONTO -- Derek Stepan scored the go-ahead goal with 1:31 remaining in the third period, and the New York Rangers defeated the Toronto Maple Leafs 4-2 at Air Canada Centre on Thursday.
Stepan beat Toronto goaltender Jonathan Bernier with a wrist shot from the slot for his 13th goal of the season. It came 59 seconds after Toronto's Colin Greening scored off a scramble to tie the game 2-2.
New York's Derick Brassard hit the empty net with 20 seconds remaining for his second goal of the game.
The Rangers lost their captain, defenseman Ryan McDonagh, after he took a check to the head from Toronto's Leo Komarov at 18:58 of the first period. Komarov was given a match penalty and could face supplemental discipline.
The Rangers said McDonagh was kept out of the remainder of the game for precautionary reasons. He returned to the lineup Wednesday against the Chicago Blackhawks after missing four games with a concussion.
"Obviously it hurt to see our captain go down again, but I think we did a good job rallying around it," Rangers defenseman Dan Girardi said. "Our first period wasn't the best, but we got in here really late and trying to find our legs and our hockey brains was a challenge. I thought we were better in the second and third."
The Rangers were playing the second of a back-to-back after losing 5-3 to the Chicago Blackhawks at home on Wednesday.
Toronto coach Mike Babcock said he wasn't sure if Komarov deserves supplementary discipline from the NHL.
Video: NYR@TOR: Brassard scores on empty net for second goal
"Leo plays hard and he's not a dirty player," Babcock said. "I know their guy was kind of crouched and it was unfortunate."
Backup goaltender Antti Raanta made 35 saves for the Rangers (33-19-6), who have won six of their past eight games. The Maple Leafs (20-27-9) have lost five of their past six.
"There's no doubt that if it wouldn't have been for Antti, it wouldn't have been a game," Rangers coach Alain Vigneault said after Raanta won for the first time since Nov. 15. "We didn't play well at all in the first period. He kept us in and we were able to battle back and somehow find a way to win this game on a night when we didn't play real well."
Toronto's PA Parenteau opened the scoring with his 15th goal of the season at 3:58 of the first period. Defenseman Martin Marincin's shot from the right point was stopped by Raanta, but the rebound deflected off Parenteau's skate and into the net. The goal stood after a video review showed there was no distinct kicking motion.
Maple Leafs defenseman Viktor Loov, playing in his first NHL game, had the second assist.
Toronto nearly made it 2-0 at 12:33 when Michael Grabner was set up in the high slot, but his shot hit the post.
With the Maple Leafs down a man because of Komarov's penalty, Toronto's Nick Spaling was assessed a four-minute minor for high-sticking Mats Zuccarello at 3:32 of the second period, which put the Maple Leafs down two skaters. The Rangers tied the game 24 seconds later when Brassard one-timed a slap shot from the top of the right circle past Bernier for his 21st goal of the season.
The Rangers took a 2-1 lead at 9:24 when Zuccarello scored his 20th goal of the season and fifth in three games against the Maple Leafs. Bernier made a terrific save on Stepan, but wound up flopped on his belly. Zuccarello corralled the rebound and took a backhand shot that Bernier appeared to stop with his outstretched pad. However, a video review showed the puck had crossed the goal line before it hit Bernier's pad.
The Maple Leafs pulled Bernier for an extra skater with 2:52 remaining in the third period and tied the game when Greening whacked the puck into the net off a scramble for his first goal since joining the Maple Leafs last Tuesday in a trade from the Ottawa Senators.
Video: NYR@TOR: Brassard snipes in PPG to tie game
Stepan said the goal was a wakeup call for the Rangers.
"We had been back on our heels a bit and it got us going," Stepan said. "I felt like for a little bit of the third we were sitting back too much and once they scored we were more assertive."
Girardi felt the Rangers' improvement during the past couple of weeks kept them from getting down on themselves after Greening's goal.
"If you asked me that six weeks ago when we were having a bit of a rough patch, the answer probably would have been yes," he said. "But over the last two weeks we have been playing the type of hockey we know we can play. If something goes wrong, we know we have to just keep going. That is just how we are playing now."
Babcock felt this was a game his players let slip between their fingers.
"Let's face it: We carried the play and we had all the opportunity to have won the hockey game," he said. "We turned the puck over twice and gave them two free goals. They had played last night and we were fresh. We played with good energy and controlled most of the play and then we made two individual mistakes and they cost us. That is the reality of the situation."
Video: Brassard's two goals lead Rangers past Maple Leafs