Rangers center Mika Zibanejad loses control of the puck against Washington...

Rangers center Mika Zibanejad loses control of the puck against Washington Capitals right wing Tom Wilson during the second period of an NHL game Saturday in Washington. Credit: AP/John McDonnell

WASHINGTON — When you are in the kind of hole that the Rangers have been in for the past month-and-a-half, playing well is not enough to guarantee winning. And even when you play well for a few games in a row, sometimes that’s not enough to turn things around.

Alex Ovechkin scored the 872nd goal of his career Saturday afternoon, and that ended up being the winner as the Washington Capitals beat the Rangers, 7-4, at Capital One Arena. The Rangers, who had ended a four-game losing streak on Thursday, have lost 16 of their last 21 games.

Goaltender Jonathan Quick (21 saves) failed in his first attempt to earn his 400th career victory.

“Again, it’s frustrating,’’ coach Peter Laviolette said. “Our start was good. There’s just some opportunities, I think, defensively, where . . . we really needed to defend hard from the top of the circles in down to the crease. We’ve just got to be firmer with what we’re doing. Guys were pushing the whole time, [but we] just couldn’t catch it today.”

The Rangers (17-20-1) entered the game looking to build on Thursday’s win but have failed to win consecutive games since they captured three straight from Nov. 14-19.

And as much as the players talk about the importance of having confidence, how can they have confidence when they keep losing, even in games in which they think they’ve played well?

“That’s a million-dollar question, isn’t it?’’ said Mika Zibanejad, whose second goal in two games, at 13:04 of the third period, briefly had them within 5-4. “What’s our option? Just say we’re done with the season? No, we can’t.

“I think we have a lot of faith in the guys that are here. We have a lot of faith in the room, from the top down. We have to keep working. The little things that we do well . . . we have to take that and build on it. That’s the only way we’re going to get it forward.’’

Filip Chytil’s breakaway goal at 8:32 of the third period brought the Rangers within 4-3, but Dylan Strome won an offensive zone faceoff and Ovechkin beat K’Andre Miller to the puck in the slot and scored on a backhander to make it 5-3 at 10:50.

Ovechkin is 23 goals shy of passing Wayne Gretzky (894) for the most goals in NHL history.

Zibanejad’s goal brought the Rangers within 5-4, but Aliaksei Protas scored on a rebound off the crossbar just 56 seconds later to make it 6-4 with six minutes remaining. Tom Wilson added an empty-netter with 37.5 seconds left.

The Rangers took the lead early thanks to a misplay by Washington goaltender Logan Thompson (29 saves), who partially fanned on his clearing attempt and sent the puck right to Chris Kreider just inside the blue line. Kreider shot the puck into the open net at 7:00 of the opening period for his second goal in the last three games.

But a holding penalty on Brett Berard late in the period gave the Capitals their second power play, and Washington tied it on a power-play goal by Strome at 18:46. A tip-in goal by Lars Eller put the Capitals up 2-1 at 2:29 of the second, and Andrew Mangiapane’s goal at 10:08 made it 3-1.

Then came a pivotal moment late in the period. The Rangers appeared to cut the lead to 3-2 when the surging Chytil set up Will Cuylle from behind the goal line and Cuylle banged it in with 6:56 remaining.

But as the teams lined up for the ensuing faceoff, Washington called timeout to look at the replay, and coach Spencer Carbery decided to challenge the goal, alleging the Rangers were offside entering the zone.

After a lengthy stoppage, the NHL Situation Room ruled Berard had entered the zone a split-second before Chytil carried the puck across the blue line, and the goal was taken off the board. It was the third time this season that a goal by Cuylle was overturned after review.

“It’s too many [overturned goals] this year for us,’’ said Chytil, who scored in the third period to cut the deficit to 4-3. “For our line, it’s already, like, three or four goals they’ve taken away from us. And it’s three goals [they’ve taken] from Cools. It’s not helping you.’’

“That’s a frustrating point,’’ Laviolette said. “That’s definitely a swing.’’

The Rangers did get within 3-2 thanks to another gift by the Capitals. Ovechkin turned the puck over in his own zone and sent Sam Carrick in for a breakaway, and he scored his first goal since opening night in Pittsburgh at 16:26.

But when Ryan Lindgren shot the puck over the glass, giving Washington another power play late in the period, Connor McMichael scored the Capitals’ second power-play goal for a 4-2 lead.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME