TORONTO -- Carolina Hurricanes coach Kirk Muller looked away because he thought Ron Hainsey's clearing shot was going to be icing.
The next thing he knew, the Hurricanes had the go-ahead goal in their 3-2 comeback win over the Toronto Maple Leafs on Thursday night.
The 174-foot shot that Hainsey bounced off the boards in his own end went all the way down to the boards behind the Toronto goal. The puck bounced back and hit the skates of Maple Leafs goaltender Jonathan Bernier for the go-ahead goal.
"It was good to see our guys get a break," Muller said. "We've been pushing hard here. I was at first disappointed that we were going to get an icing at the time of the game. It was a great job by Radek (Dvorak) getting down there to take away the icing. The first thing I know it was in the net."
Maple Leafs coach Randy Carlyle said, "Where we were, we thought the puck was going to go round and be on the other side of the net. That's the way it goes. I think the hockey gods got back at us."
Ryan Murphy and Eric Staal scored the first two third-period goals for the Hurricanes (3-2-3), who overcame the Maple Leafs' two-goal lead to snap a winless string of four games that included two overtime losses.
Joffrey Lupul and Josh Leivo scored for the Leafs (6-2-0) before a crowd of 19,277 at Air Canada Centre. The loss snapped Toronto's three-game winning streak.
Bernier replaced injured James Reimer in the Toronto goal 32 seconds into the game. Reimer, who was starting his second consecutive game for the Leafs, was injured after Leivo tried to jump over him but hit him with his leg as he was attempting to recover a rebound. Reimer was tended to before skating off the ice under his own power. He made one save.
Carlyle said Reimer had a headache.
"He basically got run over by our own player and got a thigh or knee to the neck area," Carlyle said.
Bernier stopped 34 of 37 shots. Carolina goalkeeper Cam Ward stopped 24 of 26 shots.
The Leafs took a 2-0 lead into the third period only to have the Hurricanes tie it. Carolina scored on a power-play goal on a Murphy slap shot at 2:54. Murphy's first goal of the season came on his third attempt with his first two shots blocked by Toronto players.
The goal came with Nazem Kadri sitting out on a tripping penalty.
The Hurricanes tied it after a Leafs giveaway that allowed Staal a shot from the slot at 6:48 for his third goal of the season.
The Hurricanes went ahead 3-2 on a bizarre goal at 13:04 of the third period on a clearing shot by Hainsey. The defenseman bounced the puck off the boards and the puck went all the way down the ice hit the backboards and went in off Bernier's skates. It was Hainsey's second goal of the season. Ward got the assist.
"It's in, it doesn't matter how you score it," Dvorak said. "If it goes off your head, your shin pad, whatever. We've been working hard and it's a nice payoff for us."
Murphy said, "It was a crazy ending; we'll take it," Murphy said.
Bernier added, "It was a bad play on my part."
The Maple Leafs have had their share of good breaks in a season that has started so well, even though they have played some sloppy games.
"It could be a good thing," defenseman Cody Franson said. "The way we have been managing the puck has not been good enough. Some nights we're not going to get the bounces we've been getting."
Lupul scored his team-leading sixth goal of the season at 2:30 of the second period to give the Maple Leafs a 1-0 lead. Lupul passed the puck in front of the goal from the right wing. When that didn't work, he retrieved the puck and fired in a 15-foot wrist shot. Paul Ranger had the assist, his first point as a Maple Leaf and first in the NHL since Oct. 10, 2009, also against Carolina.
The Maple Leafs took a 2-0 lead when Leivo scored his first NHL goal, hitting the upper right corner with a wrist shot from the faceoff circle. Dave Bolland and Morgan Rielly picked up the assists.
The Hurricanes outshot the Leafs 14-10 in the second period.
In a goal-less first period, the Maple Leafs had three power-play advantages to the Hurricanes' two and had a 12-10 edge in shots on goal.
NOTES: Maple Leafs LW James van Riemsdyk (back spasms) sat out his second game in a row and remains day to day. ... Hurricanes D Tim Gleason (concussion), who has not played this season, took part in the morning skate on Thursday and could return to the lineup on Oct. 24 when the team visits the Minnesota Wild. ... Hurricanes D Mike Komisarek, a former Maple Leaf, did not play and has been a healthy scratch in all but one game this season. ... Thursday's game was the start a four-game trip for the Hurricanes, who visit the New York Islanders on Saturday. ... The Maple Leafs visit the Chicago Blackhawks on Saturday.