CALGARY, Alberta (AP) — Connor McDavid scored at 5:03 of overtime and the Edmonton Oilers defeated the Calgary Flames 5-4 on Thursday to win the second-round playoff series in five games and advance to the Western Conference finals.

The Edmonton captain scored his seventh goal of the postseason, beating Jacob Markstrom off a pass from Leon Draisaitl to send the Oilers spilling over the bench in celebration.

Zach Hyman had a goal and two assists and Darnell Nurse, Jesse Puljujarvi and Evan Bouchard also scored for the Oilers. Mike Smith made 32 saves as Edmonton claimed the first postseason Battle of Alberta in 31 years.

Draisaitl added four assists — his fifth straight contest registering three-plus points to build on the NHL playoff record he set in Game 4.

McDavid and Draisaitl have both amassed 26 points to lead the playoffs so far.

The Oilers will face either the Colorado Avalanche or St. Louis Blues in their first conference final appearance since 2006. Colorado leads that series 3-2, with Game 6 set for Friday in St. Louis.

Mikael Backlund had a goal and an assist and Johnny Gaudreau, Calle Jarnkrok and Andrew Mangiapane also scored for Calgary. Blake Coleman added two assists and Jacob Markstrom made 30 saves as the Flames dropped to 0-10 when trailing a playoff series 3-1.

Coleman, who won the Cup the last two seasons with the Tampa Bay Lightning, appeared to snap a 4-4 tie with just under six minutes left in regulation after Backlund took the puck hard to Edmonton’s net. But the goal was waved off following a video review after it was ruled the winger kicked the puck over Smith’s goal line with his skate as he battled with Oilers defenseman Cody Ceci.

With his team trailing 1-0 after a tentative first period, Edmonton interim head coach Jay Woodcroft double-shifted Draisaitl and McDavid early in the second, and it nearly paid off on a couple of good opportunities.

But the Flames, who topped the Oilers by seven points in the regular season to claim the Pacific Division crown, went up 2-0 at 5:41 when Backlund scored his fifth on a slick deflection.

The Oilers got on the board at 7:40 after Draisaitl protected the puck against Backlund before finding Nurse in the slot for him to fire his second past a screened Markstrom.

Edmonton tied it up just 2:26 later on a 3-on-1 rush when Markstrom could only get a piece of Hyman’s shot before Puljujarvi swept home his second as the Oilers erased another multigoal deficit on the road.

Then, there was a wild stretch with four goals in a 71-second span.

Hyman scored his sixth goal of the series, and eighth of the postseason, on a power play at 14:57 before Gaudreau tied things again at 3-all at 15:12 with his third.

Jarnkrok then scored his first as a member of the Flames since coming over in a trade with the Seattle Kraken at 15:28 to make it 4-3.

But the Oilers responded again at 16:08 when Bouchard’s blast beat Markstrom for his second as the teams set an NHL record for the fastest four goals in playoff history — 22 seconds faster than the previous mark set by the Philadelphia Flyers and Toronto Maple Leafs in 1976.

Following a tepid start for both teams, the Flames nudged in front at 10:13 of the first when Mangiapane took a terrific pass from Coleman to score his third goal of the playoffs.

The winger’s first point of the series gave his team its first lead since late in the second period of Game 2 — a stretch of 155 minutes — that started a run of three straight losses to push Calgary to the brink of elimination.

One of three finalists for the Vezina Trophy as the league’s top goalie in the regular season, Markstrom entered Thursday with an .850 save percentage in the series after posting a .943 mark in Calgary’s seven-game victory over the Dallas Stars in the opening round.

After the Oilers, who beat the Los Angeles Kings 4-3 to set up the matchup with their provincial rival, killed off a McDavid high-sticking penalty, the Flames goaltender had to scramble to keep the Edmonton captain’s dash to the net at bay with the puck briefly lying free in Calgary’s crease.

___

More AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP_Sports