DALLAS — The Flyers may have lost, 5-2, but they scored a minor moral victory when they broke their power-play scoring drought.

With 9 seconds left on their fourth power play of the game, Ivan Provorov scored from the point. It was the Flyers’ first power-play goal in four games, Provorov’s first -- and the defense’s third -- of the season.

“It was definitely a few games where things weren’t going our way,” Provorov said. “We weren’t clicking. We weren’t on the same page. But today, I think we did pretty good.”

The goal got the Flyers to within 4-2, but they weren’t able to complete the comeback.

With both Kevin Hayes and Ryan Ellis back on the ice, the Flyers dominated the first period. However, despite outshooting the Stars, 19-7, and controlling the puck, they fell behind, 1-0. They had quality chances, including an undefended wraparound by Travis Konecny and a shot by Travis Sanheim that looked very close to going in.

“I thought our first period was probably one of our best of the season,” Ellis said.

The Stars flipped the script in the second. They outshot the Flyers, 11-5, and when the Flyers scored, the Stars responded and killed their momentum.

After two periods, the Stars had a rare 3-1 lead. They’d only led once this season going into the third, and they lost that game. To make sure this one didn’t slip from their grasp, they scored a fourth goal within the first three minutes of the third. They added an empty net goal to complete the scoring.

It was the first time this season Flyers goalie Martin Jones gave up more than three goals, and it led to his first loss.

Stepping in and stepping up

With the Flyers coming off a big victory in Carolina, the Stars’ top goalie, Braden Holtby, suffered a lower-body injury and was announced as day-to-day. Anton Khudobin started in his place.

The Flyers came in hot, peppering Khudobin with shots, but the goalie held strong and gave his team the chance to take the lead. Despite the Flyers generating twice as many shots, the Stars scored the first goal. They had five shots to the Flyers’ 10, several of which were dangerous opportunities.

Flyers head coach Alain Vigneault said the Flyers’ “inability to beat their goaltending,” especially in the first period, was a turning point in the game.

Khudobin did not give up a goal until the last 3 minutes, 24 seconds of the second period. He made the first stop but ended up on his stomach. He grasped through traffic for the rebound, but one of his teammates knocked it through, prompting Khudobin to chuck it against the boards in frustration.

Khudobin let in just one more goal, the power-play goal, and finished with 27 stops.

“Give their goalie credit,” Ellis said. “He played phenomenal tonight.”

All switched up

Vigneault knew once Hayes returned from injury, he would have adjustments to make, so he started preparing before the Carolina-Dallas road trip.

When he revealed his changes, not a single line remained the same. He added James van Riemsdyk to the top line with Sean Couturier and Claude Giroux in place of Konecny. Hayes was placed with Cam Atkinson and Joel Farabee. Derick Brassard moved from second-line center to left wing on the third line with Scott Laughton and Konecny. Oskar Lindblom moved from the third line to the fourth with Nate Thompson and Zack MacEwen.

Although the lines didn’t have a single practice to build chemistry, they came out strong. However, the Stars dominated the second period, which could be a result of exhaustion, inexperience or a lack of chemistry, and it resulted in in-game tweaks as the game went on.

A drop of rain in the power play drought

The return of Hayes and Ellis affected the power-play units in addition to the lines and pairings. Both had contributed to the power play before their injuries. To start the game, Vigneault placed both on the second unit.

The Flyers showed progress on the first power play when they generated four shots, which is more than in recent games when the Flyers had power plays without a single shot. The Flyers then had three on the second.

The third power play only lasted about 30 seconds, but it was enough time for things to fall apart again. They didn’t have any shots on goal, and the Stars cleared it twice.

But then, with 9 seconds left in the fourth power play, Hayes passed it to Provorov at the point, who scored the goal. It was just the Flyers third power-play goal in the last 30 power plays.

Ellis, who got the secondary assist on Provorov’s goal, said he can’t speak for the first unit, but he thought his group clicked well this game. They created momentum in the first two power plays and weren’t on the ice for the third. On the fourth, they scored the goal.

“We were throwing great looks, great chances,” Ellis said. “I thought we moved the puck really well and got some good, dangerous chances.”

What’s next

The Flyers have a brief break before a home game against the Calgary Flames on Tuesday at 7 p.m. They will practice in Voorhees, N.J., on Monday.