RALEIGH, N.C. (AP) -- The Toronto Maple Leafs spent the first two periods building a huge lead only to watch the Carolina Hurricanes erase it in minutes.
Fortunately, the Maple Leafs found a way to avoid a humbling loss.
Tomas Kaberle scored on a power play late in the third period, and Jason Blake had a five-point night to help the Leafs shake off a blown four-goal lead and beat the Hurricanes 6-4 on Thursday night.
Blake had three goals and two assists for Toronto, which ended a four-game losing streak. Ian White and Niklas Hagman also scored, and Vesa Toskala made 28 saves.
After leading 4-0 late in the second period, the Leafs watched Carolina score four goals in 10 minutes to tie it midway through the third. But Kaberle came through with a one-timer that bounced off Cam Ward's glove and into the net with 5:25 left to retake the lead, and Blake added an empty-net score in the final seconds to seal it.
"We didn't put our heads down," Kaberle said. "It doesn't mean that (when) it's 4-4, you're going to lose the game. It was a good attitude on the bench and it's a learning process."
Not exactly a textbook way to win, but Toronto could have used any bit of good fortune considering its struggles this month.
"I don't know if there is any bittersweetness for us," coach Ron Wilson said, "but yeah, we found a way to win. We never should have put ourselves in that position, but we did."
The Hurricanes could have said the same thing -- at least, about falling behind 4-0 with that woeful first 40 minutes. Matt Cullen, Tuomo Ruutu, Eric Staal and Scott Walker scored in Carolina's desperate rally only to see it come up short.
Carolina, which had won four straight games earlier this month, has now lost four straight.
"We need to win. We need to stay in the hunt," Staal said. "It was a good third period, but in the end it doesn't matter because we didn't get the win."
It was the first game for Carolina coach Paul Maurice against his former team since returning to the Hurricanes bench in early December. Maurice won 76 games in two seasons with the Maple Leafs before being fired after last season.
For the first two periods, the Maple Leafs -- who had won just once in 2009 and lost eight of 10 -- were the only ones playing like they had something crucial on the line.
After White's goal gave Toronto the 1-0 lead after the first, Blake pushed the lead to 2-0 when he pushed past Joni Pitkanen as he skated in on Ward and scored a wraparound goal less than 2 minutes into the period.
The Leafs kept the pressure on, with Hagman scoring on a short putaway and a diving Blake beating Ward to a pass from Dominic Moore to make it 4-0 at 15:07 of the second.