WASHINGTON — In early January, the Flyers were out of a playoff spot, 15 points out of first place, and sitting sixth in the crowded Metropolitan Division.

Now, thanks to a blistering 17-5-1 run, they are challenging for the Metro title.

Defenseman Ivan Provorov and center Kevin Hayes each had a goal and an assist as the second-place Flyers won their seventh straight, moving to within one point of division-leading Washington with a 5-2 win over the Caps on Wednesday night at Capital One Arena

“We’re climbing,” Hayes said. “That’s our main goal — to keep climbing up the standings.”

“The boys are rolling. We’re all playing for each other," Provorov said. “Everyone’s giving 100 percent out there every time they go out for a shift and it’s been paying off.”

The Flyers’ penalty kill went 5-for-5, making them 16-for-17 in four games against the Caps this season. The Flyers won the season series, 3-0-1, and held superstar Alex Ovechkin without a point in the four games.

“We’re staying aggressive and not letting them get set up,” Provorov said about the penalty kill.

“When you have guys taking away lanes and pressuring the other team on [its] power play, it really swings the momentum in your favor," goalie Brian Elliott said.

Elliott made 25 saves and played solidly as the Flyers overcame a 1-0 deficit and continued to roll.

Provorov, the trailer on the play, sped past Ovechkin, took a sweet feed from Jake Voracek (seven assists in the last three games), and scored from the left circle with 13:24 left in regulation, padding the Flyers’ lead to 4-2. It was the 43rd goal this season for a Flyers defenseman, tops in the NHL.

Scott Laughton made it 5-2 with 5:45 to go, firing a pass that deflected off the skate of Caps defenseman Dmitry Orlov and into the net.

Flyers defenseman Ivan Provorov celebrates his goal during the third period.
Nick Wass / AP
Flyers defenseman Ivan Provorov celebrates his goal during the third period.

The Flyers dominated the second period and got goals from Travis Konecny, Hayes, and Tyler Pitlick as they built a 3-2 lead.

Konecny scored on a power-play rebound to knot the score at 1-1 with 12:54 left in the second. The goal was scored 71 seconds after Konecny’s power-play goal was nullified when the Toronto war room ruled there was inconclusive evidence that the puck had crossed the goal line. (It had been ruled “no goal” on the ice, but goalie Braden Holtby appeared to have the puck under him while he was in the net.)

The score that counted — a rebound off Provorov’s shot — gave Konecny 24 goals, equaling his career high. It also gave him 13 points in his last seven games.

“It was kind of a lucky bounce,” Konecny said. “The puck hit me in the stomach area and dropped right down on my stick and I had an easy spot to put it in.”

With 5:12 to go in the second, Hayes’ 23rd goal — and sixth in the last seven games — gave the Flyers their first lead, 2-1. Derek Grant (two assists), on the left side of the net, deftly passed the puck to Hayes with his right skate. Hayes, alone on the right side, swatted the puck into a wide-open net.

A little over two minutes later, Tyler Pitlick increased the lead to 3-1, taking a drop pass from Michael Raffl and finishing a four-on-two break.

Raffl was on that line because James van Riemsdyk suffered a broken right hand blocking a first-period shot and did not return. Joel Farabee will be recalled from the Phantoms.

The Capitals, following a Laughton turnover, cut the deficit to 3-2 as Garnet Hathaway scored on a two-on-one down low with 1:28 remaining in the second.

Washington built a 1-0 lead in a chippy, evenly played first period. It was a playoff-style period, with not much space for either team and a total of just 14 shots, seven for each side.

Flyers goaltender Brian Elliott deflects the puck.
Nick Wass / AP
Flyers goaltender Brian Elliott deflects the puck.

A sensational behind-the-back pass by Richard Panik set up the Caps’ first-period goal on a two-on-two rush. Panik was on the line only because Ilya Kovalchuk had just had a power-play shift and went off the ice.

Lars Eller was the benefactor of Panik’s feed. With 5:51 left in the first, he got behind center Grant and beat Elliott from in close. Defenseman Justin Braun got caught up ice on the play.

No matter. The Flyers regrouped and took control in the second period, when they outshot the Caps, 18-8.

“Every time we play them, it’s a battle,” said Provorov after the physical matchup. “We seem to get up for those games and be at the top of our game.”

“Obviously we haven’t accomplished anything yet," coach Alain Vigneault said, “but tonight was a big game.”

And a critical win.

“Everyone’s buying into the system and we’re putting together good 60-minute efforts,” Hayes said. “It’s been fun, honestly. … It’s fun to come to the rink every day.”