Ryan Nugent-Hopkins has suffered through plenty of heartache in Edmonton.

The top pick at the 2011 draft missed the playoffs in seven of his first eight NHL seasons as the Oilers repeatedly fumbled and bumbled their way through what must have felt like a never-ending rebuild.

After a stunning turn of events midway through the third period on Tuesday night, Nugent-Hopkins rose to the occasion when he was needed most.

Nugent-Hopkins scored his second goal of the game with 3:27 left in regulation, and the Oilers beat the Calgary Flames 5-3 to take a 3-1 lead in the second-round playoff series.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"The main thing was that we had to keep pushing," Nugent-Hopkins said after Rasmus Andersson scored short-handed from 150 feet away as Calgary rallied all the way back from a 3-0 deficit to tie the game. "Stuff like that happens, it’s hockey. Bounces happen.

"There was no quit."

Edmonton interim head coach Jay Woodcroft credited Nugent-Hopkins, who was playing just the 32nd playoff game of his 11-season career, for stepping up with the team wobbling.

"It’s inspiring," said Woodcroft, whose Oilers are now one win from making the Western Conference final for the first time since 2006. "There’s room for greatness from everybody on our team.

"Tonight was Ryan’s moment."

Evander Kane scored his NHL-leading 11th and 12th goals of the postseason, and Zach Hyman added a goal for Edmonton. Leon Draisaitl added three assists and Mike Smith made 29 saves.

Connor McDavid also had two assists. He has 25 points in 11 playoff games for the Oilers, who earned a third straight victory over their provincial rival.

Andersson, Elias Lindholm and Mikael Backlund scored for Calgary. Jacob Markstrom stopped 21 shots.

"We all believe in this group," Andersson said. "We’ve been a good team all year and we’ve been strong on home ice. We’ve just got to go home and focus on winning one game and take it from there.

"Obviously we’re in a tough situation."

Stanley Cup Playoffs Flames Oilers

Edmonton Oilers center Ryan Nugent-Hopkins, second from left, celebrates his goal against the Calgary Flames with teammates during the first period of Game 4 of an NHL hockey Stanley Cup playoffs second-round series Tuesday, May 24, 2022, in Edmonton (Jeff McIntosh/The Canadian Press via AP)

Calgary will look to stave off elimination on Thursday at home in Game 5.

After trailing 3-0 after the first period and 3-2 through two periods, Calgary tied the game in the third on an Edmonton power play when Andersson fired a 150-foot clearing attempt from his own end that somehow fooled Smith at 10:56.

With the Oilers wavering, Nugent-Hopkins poked in his fourth goal of the playoffs from in front of Markstrom.

Andersson then took a four-minute penalty for high-sticking with 2:40 left to effectively kill off the game before Kane iced it by scoring into an empty net.

"I can laugh now, right?" a relieved Smith said. "I don’t think there’s been a time in my career where I’ve lost the puck, where I have no idea where it went.

"You don’t want that to happen ... ever. It was an unbelievable goal by Nuge at the end there ... a win is a win."

Edmonton also held a 2-1 series lead in the first round against the Los Angeles Kings only to play what the Oilers described as their worst performance of the month in a 4-0 loss. This time, they took a stranglehold on the series without their best effort.

CLICK HERE TO GET THE FOX NEWS APP

"Every game you play in the playoffs, you gain experience," Smith said. "There are ebbs and flows to a game, to a series, and they are all learning experiences."

Markstrom, who had allowed 14 goals in the series before getting pulled after two periods with Calgary trailing Sunday’s Game 3 by a 4-0 score, played the puck behind his own net on the first shift, but put it right on Nugent-Hopkins’ stick. He scored his third.

The goal was the third-fastest in Oilers’ playoff history, just short of McDavid (19 seconds in 2020) and Fernando Pisani (16 seconds in 2006).

One of three finalists for the Vézina Trophy as the NHL’s top goalie, Markstrom recovered to deny Darnell Nurse on a chance a couple minutes later before Smith was at full stretch on a Johnny Gaudreau one-time chance.

Calgary winger Tyler Toffoli then took a tripping penalty and the Oilers made the Flames pay when Hyman outmuscled a hobbled Chris Tanev — back in the lineup for the first time since Game 6 of the opening round despite a suspected upper-body injury — in tight, scoring his fifth goal of the series and seventh of the playoffs at 9:53.

The Flames, who topped the Pacific Division in the regular season, pushed back with a couple of decent shifts, but Kane, who was coming off a natural hat trick in Game 3, made it 3-0 with 66 seconds remaining in the period on a shot that nicked blueliner Nikita Zadorov.

Calgary showed some life on slick power play in the second with Kane off for slashing. Lindholm eventually picked the top corner for his fifth goal at 9:04 after the Oilers twice failed to clear the defensive zone.

Backlund got the Flames within one at 3-2 just 36 seconds later when he stepped past Duncan Keith and fired his fourth past Smith.

Smith made a good stop on a Lindholm power-play chance early in the third before Edmonton got its second man-advantage with 11 minutes left in regulation.

Markstrom kept his team within striking distance with a terrific pad stop on Draisaitl, who became the first player in NHL history to register three-plus points in four straight playoff games with an assist on the Oilers’ empty-net goal.