TORONTO -- Despite not playing its best, Anaheim found a way to reach the postseason.

The Ducks clinched a playoff spot for the fourth consecutive season in their 6-5 overtime loss to the Toronto Maple Leafs on Thursday night.

The Ducks entered the game needing only one standings point to reach the postseason and got it when they rallied from a 4-1 deficit to force the extra period.

"The first 38 minutes we didn't compete. It's simple," Ducks coach Bruce Boudreau said.

"They were getting the pucks deep and beating us to the punch. We scored the first power-play goal, but we must have given the puck away six times in the next five minutes.

"To the team's credit in the third period, or even at the end of the second, they never quit. Then in the third period I thought we played pretty well for the most part."

Nazem Kadri had two goals and two assists, including the overtime winner, for Toronto.

"My mindset's totally changed," Kadri said of his evolution as a player. "Before I went pro, taking faceoffs, if I won them I won them if I lost them I lost them. Half the time I was trying to go forward on draws anyway to try to create offense."

The Maple Leafs scored three power-play goals against the NHL's top penalty kill to win their fifth in the past six games.

Toronto allowed four unanswered goals before rallying to even the score at 5-5 on Connor Brown's first NHL goal before Kadri sealed it 41 seconds into extra time.

Tyler Bozak also scored twice for the Leafs, with Frank Corrado getting his first goal for Toronto.

Jamie McGinn tallied twice for Anaheim. Andrew Cogliano, Ryan Garbutt and Brandon Pirri also scored goals.

"We had some guys step up and make some plays," Ducks forward Ryan Getzlaf said. "You saw on the goals, we executed properly and we were able to maintain puck control, those kinds of things."

Garret Sparks made 33 saves for Toronto and Frederik Andersen made 20 saves.

The Ducks, who have the NHL's top power play, opened the scoring with the man advantage. Picked up in a midseason trade with Buffalo, McGinn was first to a rebound in the slot and tucked the puck past the right pad of Sparks.

Bozak matched his effort just over a minute later. Playing his first game since Feb. 6 after a 21-game absence because of a concussion, Bozak fired a shot from the right point that eluded Andersen, who was screened in front by winger Josh Leivo.

The Leafs pulled in front less than three minutes later on a power play. Kadri snapped an 11-game goal drought with his first goal since Feb. 29 and his 13th this season. The 25-year-old, perched in the slot, received a pass from in tight by linemate Milan Michalek, beating Andersen far side.

The puck landed on Michalek's tape after Brown's shot attempt was partially blocked by former Leaf Korbinian Holzer. Anaheim hadn't allowed a power-play goal in eight previous games.

Toronto scored again on its second power play in the second when Bozak got his second of the game after a cross-ice pass from Kadri.

"It's been fun to watch him grow and become better," Bozak said of Kadri. "And I know he's still got a lot of room to get better too."

The 30-year-old nearly had the hat trick a short while later after his rebound attempt in the Anaheim crease was stopped by Andersen.

Corrado, a Toronto native, upped the lead to three with about three minutes left in the second period. The Ducks struck twice though in nine seconds to pull back within one.

McGinn beat Sparks with a wrist shot for his second power-play goal of the game, joined on the score sheet immediately thereafter by Cogliano, who batted his own rebound attempt into the net.

The Ducks completed their comeback six minutes into the third on a short-handed goal from Garbutt, who outmuscled Jake Gardiner for control of the puck in front of the Toronto net, flipping a backhand shot past the blocker of Sparks.

Pirri gave the Ducks their first lead since the early moments of the first period. Acquired from Columbus at the trade deadline, he pounced on a point shot rebound, his first goal with the Ducks and 12th this season.

Playing in only his fourth NHL game, Brown evened the score at 5-5 with less than five minutes to go. The 22-year-old roofed a backhand attempt for Toronto's third power-play goal of the game. It was the first time all season that the Ducks have allowed three power-play goals in a game this season.

Game notes

Ducks center Ryan Kesler and defenseman Simon Despres both returned to Anaheim prior to the game. Kesler had to attend to a personal matter while Despres was sidelined by injury. ... The Leafs honored former Toronto mayor Rob Ford during the first TV timeout. Ford died on Tuesday.