The Flyers’ long, admirable climb into playoff contention suffered a severe setback Thursday night at the Wells Fargo Center.

Left with little margin for error because of a disastrous first half of the season, the Flyers were sloppy on defense as they dropped a 5-2 decision to the defending Stanley Cup champion Washington Capitals.

High-scoring Alex Ovechkin was held in check, but the Capitals got three goals from third-line forwards, including two from Brett Connolly (three points, plus-3).

Rookie goalie Carter Hart, who wasn’t particularly sharp in his first start in three weeks, allowed four goals on 31 shots as the Flyers fell to 0-3 against the Capitals this season, yielding five goals in each of those defeats.

“After the first 20, 25 minutes, I started to feel a little better in the net," said Hart, who had been sidelined by an ankle injury. “... But at the end of the day, I have to make a couple more saves to give our team a better chance.”

The Flyers remained five points out of a playoff spot with 12 games left.

“They’re Cup champions for a reason," center Scott Laughton said of the Caps, winners of eight of their last nine games. “We got off to another start where we made too many mistakes and they ended up in the back of our net. It’s hard to come back from that.”

The Flyers played without one of their top players, right winger Jake Voracek, who was serving the final game of his league-mandated, two-game suspension. Voracek will return to the lineup Friday in Toronto.

“We have a quick turnaround; we go to Toronto and play a hungry team there, and we have to be hungrier," Laughton said. “We have to have a good start in that building. It’s a must-win game for us. No other way.”

The Flyers went 0-for-4 on the power play and are 0-for-12 in their last five games.

“We’ve gotten some decent looks,” winger James van Riemsdyk said. “We have to stick with it and the bounces will eventually come.”

The Caps secured the win on Evgeny Kuznetzov’s empty-net goal with 2 minutes, 26 seconds left.

Washington dominated the first period and built a 2-0 lead on goals by Connolly and Lars Eller.

An all-alone Connolly, stationed near the goal line to the left of the net, took a slick feed from Michal Kempny and knocked in an easy goal with 17:07 left in the first. A little less than seven minutes later, a Travis Sanheim turnover led to a goal by Eller, who scored on his own rebound.

The Flyers got to within 2-1 after almost falling into a 3-0 hole.

Shayne Gostisbehere broke up a two-on-one shorthanded chance for the Caps and fed van Riemsdyk, who beat Braden Holtby from the top of the right circle with 18:57 to go in the second period. The goal, scored just after a power play expired, was van Riemsdyk’s eighth in the last 14 games.

But a miscue by rookie defenseman Phil Myers contributed to Connolly’s second goal of the night, putting the Caps ahead, 3-1, with 11:17 remaining in the second.

Myers tried to keep the puck in the offensive zone near the blue line with his skates, but he whiffed and it was picked up by Connolly, who raced the other way, ahead of the pack, and whipped a left-circle shot over Hart’s left shoulder.

Just 65 seconds later, Tom Wilson, with Hart over-committed to the left side, scored from the high slot as he ripped a shot into a half-empty net to give the Capitals a 4-1 lead.

Laughton, extending his career-best point streak to six games, converted Ryan Hartman’s pass and scored from the doorstep to get the Flyers within 4-2 with 7:38 left in the second.

The Flyers were outshot by 25-14 in the first two periods, during which they repeatedly surrendered odd-man rushes.

The Flyers entered the night with a 19-5-2 record since Jan. 9, putting them third in the NHL in points (40) and tied for second in wins in that span. The matchup against the Capitals started a challenging three-games-in-four-nights stretch in which the Flyers also play in Toronto on Friday and in Pittsburgh on Sunday.

“For us, we have to put this behind us,” Gostisbehere said. “We obviously have Jake coming back and we’ll get some better play from everyone. We know what’s on the line.”