Updated

Toronto, ON (SportsNetwork.com) - Ron Hainsey's fluke goal in the third period gave the Carolina Hurricanes a surprising 3-2 win over the Toronto Maple Leafs on Thursday.

Ryan Murphy and Eric Staal also scored in the third period for the Hurricanes, who snapped a three-game losing streak. Cam Ward made 24 saves in the win.

Joffrey Lupul and Josh Leivo scored the goals for the Maple Leafs, who came into the game having won six of seven to start the season.

"We had so many good things going for us coming into the game," said Lupul. "It was just one of those nights where things didn't work out for us the way we wanted them to."

James Reimer started the game for Toronto, but left just 32 seconds in after getting hit in the head during a collision with Leivo. Jonathan Bernier played the rest of the game and allowed three goals on 37 shots.

Carolina had trailed by two goals entering the third period and rallied to tie the game with a pair of markers, then took the lead on Hainsey's second of the year.

On the play, Hainsey cleared the puck out from his own end down the left wing. The puck then bounced off the backboards to the left of Bernier and slid towards the net. Bernier made an attempt to swipe it away with the stick, but missed and the puck bounced off his right skate and snuck in with 6:56 to play.

"It's just one of those lucky things that happens over time," said Hainsey.

From there, Ward made the stops as he finished the third period with eight saves to give his team the win.

Earlier in the third, Carolina made it a 2-1 game as Murphy's slap shot from the left point hit off the stick of a Leaf and went in at 2:54 on the power play.

Staal tied the game four minutes later as he lasered a wrister from the slot past Bernier for his third of the year.

The first period passed without a goal, but the Leafs got on the board just 2:30 into the second as a broken play saw a confused scramble in front of the Carolina net, with Lupul chipping it in from the left side for his sixth of the year.

Just over four minutes later, Toronto made it a 2-0 game as Leivo raced the length of the ice down the right wing and snapped a wrister from the low circle past the glove of Ward for his first career goal.

Game Notes

Toronto plays in Chicago on Saturday ... Carolina continues it four-game road trip in New York against the Islanders on Saturday ... Carolina took two of three from Toronto last season ... Both teams had four power-play opportunities, with Carolina scoring once and Toronto failing to convert.