CALGARY -- All the Edmonton Oilers needed was 20 minutes and a provincial rival to put them back in the win column.

The Oilers struck three times in a 6:42 span to erase a two-goal, third-period deficit to beat the Calgary Flames 4-2 at Scotiabank Saddledome in the Battle of Alberta on Saturday night.

Edmonton received goals from Jordan Eberle, Ales Hemsky, David Perron and Boyd Gordon to snap a five-game losing streak and extended Calgary's to six, including three straight on home ice. It also gave the Oilers their second win in 12 games.

"(It was) not anything other than 'We get one, who knows what happens' and look what happened," Jordan Eberle said. "The biggest thing with this team is we have a lot of pressure on us from our team itself, our organization, from the fans. They expect us to win. When you're not winning, it kills the confidence in the team. You start making plays you're not used to making. You start squeezing the stick and you start not playing as a team.

"That's what we've been doing. It seems like the last two games we've gotten down, we've put our heads down and played and had fun and played the game, and that's when we've played our best hockey."

The Oilers needed one period to change their fortunes.

Sean Monahan and Dennis Wideman put Calgary up after two periods. But after being outplayed, outshot and out-chanced for 40 minutes, Edmonton quickly went to work to erase the 2-0 deficit in the third.

After taking a feed from Taylor Hall in the slot, Eberle caught Flames goaltender Reto Berra sliding the wrong way and buried his fifth of the season to start the comeback at 3:41.

"When you're in a bit of a slump, you just get the puck on net," Eberle said. "It was a good, quick release and great pass by Hallsy. I just tried to get it far side, quick release and get the team going."

The Oilers struck again at 8:18. Sam Gagner's pass hit Wideman, ricocheted high into the air and Hemsky batted the puck in before Berra could get a read on it to tie the game 2-2.

Perron capped the comeback with his fifth goal of the season. After beating Wideman off the boards, he fired a shot from below the goal line that bounced off Berra's back and in the net at 10:23 to give Edmonton a 3-2 lead.

"I saw a little bit of room," Perron said. "I'd lie to you if I told you I knew I'd score on that shot. I think I was the only guy in the rink that knew it was in the net. It was a good feeling."

Gordon added an empty net goal with 47.5 seconds left to give Edmonton some added insurance.

"It's something hopefully we can build on," Perron said. "There's times in the year we felt we could've had a better result, and tonight is one of those games where I think it was the other way for the most part of the game and we ended up on top. Hopefully we can build on that."

The Flames forced the Oilers to battle back after a quick start.

After managing just six shots in the first period against the Dallas Stars on Thursday and three in the opening 20 minutes against the San Jose Sharks on Tuesday, Calgary came out flying against Edmonton.

The Flames managed shots on back-to-back shifts to start the game with Lee Stempniak hitting Dubnyk in the pad before striking the far post 23 seconds in. On the next shift, Mike Cammalleri split Edmonton's defense, but was bested by Dubnyk too.

Monahan, with his eighth of the season, opened the scoring at 12:23.

After Ryan Nugent-Hopkins turned the puck over at the offensive blue line, Monahan hauled the puck into the Oilers' zone and worked a give-and-go with Jiri Hudler before beating Dubnyk to give the Flames a 1-0 lead.

Edmonton showed more jump in the second but Berra, making his sixth start in seven games, was equal to the task.

The Flames goaltender flashed a quick pad on Hemsky's one-timer from the slot 90 seconds into the period. Four minutes after that, Berra denied Nugent-Hopkins' attempt coming off the half-wall. He then made back-to-back saves off Hemsky's point shot and Gagner's rebound attempt with the Oilers on the power play with over five minutes remaining, two of 10 saves in the period.

The stops gave Calgary life.

Wideman walked in off the blue line and into a Matt Stajan centering pass, blasting the puck over the glove of Dubnyk with 2:52 remaining in the second to put the Flames up 2-0 after 40 minutes.

But the Flames couldn't hang on to the lead.

"We gave them two goals out of three," Calgary coach Bob Hartley said. "After 40 minutes, I felt that we gave them nothing. We were playing our style. Then, their first goal and third goal, there's only one word for those two goals -- awful."