Jacob Josefson and Patrik Elias scored in the shootout and the New Jersey Devils rallied late to beat Toronto 2-1 on Wednesday night, extending the Maple Leafs' losing streak to a season-high seven games.

Cory Schneider made 29 saves through overtime and handled both Toronto shootout attempts as the Devils won for the fifth time in eight games (5-2-1). Defenseman Adam Larsson scored the tying goal with 2:50 left in regulation.

James van Riemsdyk scored on a breakaway in the third period, and Jonathan Bernier made 22 saves in Toronto's loss.

Bernier made a pad save on Scott Gomez on the Devils' first shootout attempt, but Josefson and Elias beat him with backhanders on the next two tries.

Mike Santorelli missed the net on Toronto's first attempt, and Schneider stopped Tyler Bozak on the second.

Larsson's goal was his second of the season. Martin Havlat sent the puck to the right point, and the 22-year-old defenseman wristed a shot through traffic that beat Bernier for his fifth goal in 158 career games.

Until the unlikely goal, it appeared that van Riemsdyk's goal with 8:11 left in regulation would be the winner. It capped a breakout play on which former Devils forward David Clarkson sent a pass between his legs to Bozak, who made a nifty pass to spring van Riemsdyk in alone on Schneider.

Bernier had kept Toronto ahead with a glove stop on a breakaway by Mike Cammalleri with roughly five minutes to play.

The only real action in the first two periods came during power plays.

Toronto had the best chances with the extra man but Schneider made two outstanding stops on van Riemsdyk. The first was a skate save against the goal post after the forward backhanded a shot between his legs in the opening period. The second was a glove save from point-blank range late in the second period after Tyler Bozak made a no-look pass.

Schneider was at his best in the second period, stopping a breakaway by Santorelli midway through the period. He then got lucky about a minute later when Leo Komarov banged a shot off the post from the left circle.

Bernier faced only 13 shots in the first two periods. His best save was a pad stop on Havlat's shot from just inside the right circle during a power play.

NOTES: The Devils began a five-game homestand. ... D Andy Greene played in his 195th consecutive game, one shy of tying Scott Stevens for the second longest streak by a Devils defenseman. ... Maple Leafs captain and defenseman Dion Phaneuf is out due to an upper-body injury. His status will be updated weekly. ... Peter Holland returned to the Toronto lineup after missing 10 games with an upper-body injury. ... Devils forwards Jaromir Jagr and Tuomo Ruutu were back in the lineup after illnesses forced them to miss the three games before the All-Star break.