The Washington Capitals entered Friday night’s contest as the worst team in hockey. Losing ground in the standings by the day, they could no longer afford to let close games slip past, whether by coughing up a lead in the third period or simply failing to capitalize on offensive chances.

In any case, the Capitals needed to come away with a victory at Verizon Center against the Philadelphia Flyers and that’s precisely what they did. Washington recorded three even-strength goals for the first time this season and showed a new level of late-game gumption to secure a 3-2 win over the Flyers for its second victory of the season as it improved to 2-5-1.

“I think the last week we’ve been playing better hockey and stayed with it again today. It took 60 minutes, but we got the job done,” Coach Adam Oates said. “It’s been a few games coming. Guys hung in there and played very good hockey again. Tonight was very encouraging.”

While it certainly wasn’t a flawless win — going 0 for 5 on the power play with seven shots isn’t a helpful trend — Washington simply needed to forge a different result for itself.

After suffering one-goal losses this week to Ottawa and Toronto in which they squandered leads after 40 minutes both times, the Capitals showed they could both fight back and protect their advantage against Philadelphia.

“It was really big. We had a tough road trip here,” said center Nicklas Backstrom, who recorded his first goal of the season in the win. “We really needed this one, especially in this position we’re in. We need points.”

The two teams played a scoreless first period but it wasn’t without drama.

Defenseman John Erskine elbowed Flyers forward Wayne Simmonds to the head as he skated past him near the offensive blue line. Simmonds was able to skate to the bench under his own power but left the game and did not return. While Erskine, who wasn’t made available for comment post game, wasn’t penalized for the play, it could warrant supplementary discipline from the NHL.

Oates said he hadn’t watched the replay of the hit, but Flyers Coach Peter Laviolette offered his blunt assessment: “It looked dirty when I first saw it.”

Philadelphia dominated the start of the second period. With 11 minutes 43 seconds remaining, the visitors took a 1-0 lead on a goal by defenseman Bruno Gervais. Flyers forward Danny Briere had positioning on Karl Alzner, prompting Mike Green to drift over to the left side of the ice to help his teammate, but it also left plenty of open space for Gervais to pinch and fire into an open net with goaltender Braden Holtby (29 saves) unable to recover in time.

At the time, the Flyers were outshooting Washington, 9-3, in the period. The Capitals weren’t generating consistent offensive pressure as they were trying to contend with Philadelphia’s trademark presence in front. But a bad Flyers line change served as the catalyst Washington needed to even things up.

John Carlson poked the puck away from Sean Couturier as the Flyers forward tried to enter the Washington zone, sending it back through center ice where Backstrom picked it up. Backstrom zipped up ice on a breakaway, pulled the puck to the right and backhanded it past Ilya Bryzgalov (23 saves) with 2:17 remaining in the second to make it 1-1. It was the type of smart, opportunistic play Oates wants the Capitals looking for.

“I think that the more you move the puck north the better you are off. I think that’s one of our mentalities, and we’ve been working on it, whether it’s D-to-D and up or if the play’s there, obviously they want us to make it,” Carlson said of the pass. “I can’t necessarily say that I meant to put it on his tape like that, but I was just trying to make a defensive play at the blue line and it worked out pretty well.”

The Capitals entered the third period with 73 seconds of a five-on-three power play but couldn’t do much. They struggled to enter the zone, going offsides once, didn’t generate quality chances and derailed their own efforts by firing the puck into the Flyers’ bench.

The dismal showing on the power play could have easily rattled Washington, but knowing that there was plenty of game left the Capitals shrugged it off.

“We didn’t really let it bother us too much; there was still 19 or 18 minutes left in the game and we had to come out with the win,” winger Troy Brouwer said. “Because right now we’re falling behind and we’ve got to find a way to make some ground up to get back in the playoff race.”

Back at even strength, Brouwer found himself in the left circle with all the time and space he could want to engineer a shot after receiving a smooth set-up pass from Green. He teed up a perfect sharp-angle shot, sending the puck over Bryzgalov’s shoulder and into the upper left-hand corner to make it 2-1, 3:57 into the third.

Less than three minutes later, Wojtek Wolski demonstrated another of the key components of Oates’s system by turning a neutral-zone turnover into offense. Flyers defenseman Luke Schenn couldn’t control the puck when it was drawn back to him on the faceoff, allowing Wolski to snatch it away and race off for a breakaway. Wolski backhanded the puck past Bryzgalov to make it 3-1.

Brayden Schenn scored on a rebound, cutting the Capitals lead to 3-2 with 9:30 remaining but the Capitals were finally able to see the lead through to a conclusion.

“We need to look at the positive from the last couple games of the fact that we have had the lead,” Wolski said. “We just haven’t played a full 60 minutes. And I think tonight we gave that effort and we want to carry it into the next couple of games.”