TORONTO (AP) -- The Toronto Maple Leafs didn't allow a goal in their first five periods of the season.
Suddenly, their strong defensive game unravelled in a hurry.
The Maple Leafs almost wasted a hat trick by Phil Kessel on Saturday night, surviving a furious Ottawa comeback to hang on for a 6-5 victory over the Senators.
Up 5-1 midway through the third period, Toronto sat back and watched as Ottawa jumped into the game.
"I'm hoping it was all a dream and I'm going to go out there for the third period," said James Reimer, who had his shutout streak broken at 101:42. "But, you know what, a win's a win.
"It sure wasn't pretty, but the fans got their money's worth and we got the two points."
Mikhail Grabovski, Joffrey Lupul and Colton Orr also scored for Toronto, and Reimer made 27 saves.
Kessel added an assist, while Lupul had two.
"We played good for 50 minutes and took our foot off the pedal," Maple Leafs captain Dion Phaneuf said. "We got to learn from that, but it's a big two points for our team and we'll take them."
Daniel Alfredsson scored twice for the Senators, coming off a 5-3 loss in Detroit on Friday night. Colin Greening, Jason Spezza and Stephane Da Costa, with his first in NHL goal, also scored, and Erik Karlsson had three assists.
Alex Auld took the loss in relief for Ottawa after allowing two goals in the third period. Craig Anderson started and gave up four goals on 20 shots through two periods.
Alfredsson made it a 5-2 at 11:04 of the third with a short-handed breakaway goal after taking a clearing attempt coming out of the penalty box.
The Senators then struck for a pair of power-play goals. Spezza scored with 4:24 left and Alfredsson got his second of the game on a deflection 8 seconds later.
Kessel replied for the Leafs with his third of the game with 2:19 left, snapping a shot over Auld's glove hand on a 2-on-1 rush.
But Ottawa struck back when Da Costa took a feed from Karlsson and scored with 1:54 to go.
Notes: Orr took Jay Rosehill's spot in the lineup for Toronto. ... Ottawa plays back-to-back games 16 times this season. ... The Maple Leafs started the season tied for the second youngest roster (26.3) in the league behind the Nashville Predators . ... The Leafs have a week off until they face Calgary at home next Saturday night. ... The Senators return to Ottawa for their home opener Tuesday night against Minnesota.