Corey Perry's double-OT goal puts Ducks past Oilers 4-3

Edmonton Oilers right wing Zack Kassian, left, and Anaheim Ducks left wing Nick Ritchie brawl during the second period in Game 5 of a second-round NHL hockey Stanley Cup playoff series in Anaheim, Calif., Friday, May 5, 2017. (AP Photo/Chris Carlson) (The Associated Press)

Edmonton Oilers center Connor McDavid celebrates after scoring against the Anaheim Ducks during the second period in Game 5 of a second-round NHL hockey Stanley Cup playoff series in Anaheim, Calif., Friday, May 5, 2017. (AP Photo/Chris Carlson) (The Associated Press)

Anaheim Ducks center Ryan Getzlaf shoots against the Edmonton Oilers during the first period in Game 5 of a second-round NHL hockey Stanley Cup playoff series in Anaheim, Calif., Friday, May 5, 2017. (AP Photo/Chris Carlson) (The Associated Press)

Corey Perry scored 6:57 into the second overtime after the Anaheim Ducks rallied from a three-goal deficit in the final minutes of regulation, completing a spectacular 4-3 victory over the Edmonton Oilers on Friday night and seizing a 3-2 lead in their second-round playoff series.

Rickard Rakell put the tying goal through a crowd of prone players with 15 seconds left in regulation to cap a stunning sequence of three goals in just over three minutes, all with goalie John Gibson pulled for an extra attacker.

After nearly 27 tense minutes of overtime, Perry collected a pass from Ryan Getzlaf and waited out a sprawling Cam Talbot to finish Anaheim's third straight win — and the first home victory for either team in the series.

Game 6 is Sunday in Edmonton.