Rangers goalie Henrik Lundqvist looks on after allowing a goal...

Rangers goalie Henrik Lundqvist looks on after allowing a goal to the Capitals' Nicklas Backstrom during the second period at Capital One Arena on Dec. 8, 2017 in Washington. Credit: Getty Images / Patrick Smith

WASHINGTON — In the heat of a Metropolitan Division battle, precious points slipped away from the Rangers.

They battled back from a two-goal deficit to tie it, only to see the Capitals score twice in a two-minute span late in the third period and skate away with a 4-2 win Friday night at Capital One Arena.

“Definitely a missed opportunity,” Ryan McDonagh said, “and it stings because we worked hard to climb back in it, but we let them make plays and they burned us.

“If we aren’t making good decisions [against the Devils on Saturday] and certainly don’t come out with the right pace and desperation that we need, we’re going to get burned again, so we have to focus on having a good start.”

And certainly a better finish.

The Rangers fought back from the 2-0 deficit on Michael Grabner’s goal with 57 seconds left in the second period and Jesper Fast’s goal at 9:37 of the third. But the Capitals went in front on a busted play.

The sequence started with a pass from Kevin Shattenkirk that coach Alain Vigneault said was meant for a forward who missed an assignment. That caused a turnover, and Matt Niskanen fought off Boo Nieves in front to tuck a rebound past Henrik Lundqvist at 16:28. It was his first goal of the season.

“It’s extremely disappointing,” said Lundqvist, who slammed his stick on the crossbar after the goal. “In the end, it’s just a play in front where we can’t track it down. It happens, but it hurts because we battled to get back into it. When they turn it up, they’re a very good team.”

Tom Wilson, who got past Shattenkirk to earn an assist on Niskanen’s goal, then bull-rushed through the defense for a fortunate goal in front. The puck changed direction and got through Lundqvist at 18:28 after hitting the blade of a Rangers stick.

“Five minutes left, we just couldn’t close the deal,” Rick Nash said.

The Blueshirts fell behind quickly. Jay Beagle’s 30-foot wrister from the inside edge of the right circle went past Lundqvist’s extended right pad.

“Obviously not ideal,” said Lundqvist, who stopped the next 16 shots in the first period and 36 in all. “I felt really sharp but it [expletive] to give up four goals, especially two late.”

When Grabner’s clearing pass bounced off Mats Zuccarello’s skate, Nicklas Backstrom, standing between the circles, was in the right spot for an unassisted, under-the-crossbar shot at 11:42 of the second for a 2-0 lead.

But J.T. Miller found Grabner open and he ripped a shot past Braden Holtby’s short side to trim the lead to 2-1. It was the 14th goal of the season for Grabner, who has scored 13 since Oct. 26, the most in the NHL during that span.

In the third, Paul Carey won battles with two Capitals behind their net and found Fast, who beat Holtby to pull the Rangers into a 2-2 tie.

That would be it for the Blueshirts (15-11-2), who remain three points out of a wild-card spot in the Eastern Conference.

The Capitals (18-11-1) moved into a tie with the Blue Jackets atop the division and improved to 12-5-0 at home.

“We made one mistake too many in the third,” said a frustrated Vigneault, who walked away from the postgame interview and threw a lozenge past a row of exercise bikes.

More Rangers