Allowing two shorthanded goals on the same power play is not a recipe for success.

Yet the Flyers overcame that development Thursday night and rallied past Arizona in overtime, 5-4, at the Wells Fargo Center.

Defenseman Shayne Gostisbehere won it with 3 minutes, 59 seconds left in overtime. He also set up Dale Weise's breakaway goal — his first tally of the season — with 2:13 to go in regulation to knot the game at 4-4.

Jake Voracek made a hardworking play to gain control of the puck and fed Gostisbehere for a one-timer — and the game-winner — from the right circle as the Flyers overcame a 4-2 third-period deficit.

"I kind of cheated a little bit. Stayed up. Knew Jakey was going to make the play," Gostisbehere said after the sixth overtime goal of his career.

The Flyers blew an early 2-0 lead before staging their comeback.

"I said it a couple weeks ago. Sometimes you have to [man] up and get a character win," coach Dave Hakstol said. "That's what tonight was."

Earlier in the third, Scott Laughton's second goal of the game, a rebound with 17:39 remaining, cut Arizona's lead to 4-3.

"For whatever reason, since I've been here, we're a real good third-period team," Weise said. "We score early, the crowd starts rallying, and we really feed off that energy and I think we did in the third."

The win gave the Flyers a 4-0-1 record in their last five games.

They were coming off a 3-0-1 trip out West, which lifted their road record to 5-3-1.

The game turned in Arizona's favor when Derek Stepan and speedy Michael Grabner — a free-agent signee who would have helped the Flyers' dreadful penalty kill — scored shorthanded goals 24 seconds apart to give Arizona a 4-2 second-period lead.

Stepan took the puck away from Gostisbehere in the neutral zone, and he went in alone as the Flyers defenseman ran into linesman Michel Cormier. Stepan beat Cal Pickard with a backhander to give the Coyotes a 3-2 lead. (The players on the Flyers' bench and Gostisbehere were irate with the linesman.)

Grabner then outraced Voracek for a loose puck and put another backhander past Pickard to make it 4-2 with 13:22 left in the second. It was Arizona's league-leading ninth (ninth!) shorthanded goal in 14 games this season.

To put that in perspective, 14 teams entered the night with nine or fewer power-play goals, including the Flyers (eight).

After Grabner's goal, Brian Elliott replaced Pickard, who allowed four goals on 18 shots. Elliott stopped all 16 shots he faced.

"We kind of left Pick hung out to dry," Weise said.

The Flyers, a 5-2 winner Monday in Arizona, scored first for the fourth straight time and built a 2-0 lead in the first 5:47.

Travis Konecny took a clever give-and-go feed from Claude Giroux and scored just 1:18 into the game, putting a backhander past Darcy Kuemper. About 4½ minutes later, Laughton outworked two Coyotes in front and scored on a backhander to make it 2-0.

Arizona cut the deficit to 2-1 as defenseman Oliver Ekman-Larsson scored on a point drive, whipping a low shot past a screened Pickard. It marked the ninth straight game the Flyers had allowed at least one power-play goal. Their penalty kill began the night ranked 30th in the 31-team NHL, clicking at just 69.1 percent.

The Coyotes outscored the Flyers 3-0 in the second period and outshot the hosts, 15-7. That explains why the home team received loud boos as it went to the locker room after the session ended.

The Flyers regrouped, however, and had a strong third period to send the game into overtime and set the stage for Gostisbehere's heroics.

"Tough second period tonight, but I thought the third was one of our best of the year," Laughton said. "We were putting pucks in [the zone] and working hard and guys were making plays. That's a big win for our group."