Goalie Philipp Grubauer was arguably the Capitals’ best player Sunday afternoon. (Seth Wenig/Associated Press)

As the puck rattled around in the cage behind him, goaltender Philipp Grubauer slouched in his butterfly pose and his head dropped back in frustration. He had performed admirably, arguably the Washington Capitals’ best player Sunday afternoon at Madison Square Garden.

But in what became a goaltending duel between Grubauer and New York’s Henrik Lundqvist, Grubauer and the Capitals were bested, 2-1, by the Rangers. Lundqvist made 31 saves for the win. Grubauer made 28 for the loss.

“Both goalies played well,” Capitals captain Alex Ovechkin said. “Lots of chances.”

“Grubi was outstanding,” Capitals Coach Barry Trotz said. “It could have been 5-0 [Rangers] in the first.”

Instead, it was tied in the third period until the Rangers took a lead with 11:23 left in the game. Mika Zibanejad won an offensive-zone draw against Jay Beagle, and then Chris Kreider beat the Capitals to the puck along the wall, feeding it to Mats Zuccarello for a snap shot from the slot that got past Grubauer. The Capitals’ top line responded with a marathon shift immediately after, but Lundqvist ended it with a save on a shot by Dmitry Orlov.

After Washington took a six-game winning streak into its bye week, the Capitals have now lost both of their games coming out of it following Saturday’s shootout loss in Detroit and then Sunday’s regulation one to a Metropolitan Division foe.

It’s the first time Washington has suffered consecutive losses since late December, but the Capitals still have the most points in the NHL. More importantly, they saw their improved play in the final 40 minutes of the game Sunday as an encouraging sign as they try to rediscover their dominant form from before the break.

“It was a lot better, that’s for sure,” Capitals center Nicklas Backstrom said. “First period wasn’t how we play. But I don’t know, we’ve lost two in a row. We’ve just got to get back to the way we played before. We’re going to have another practice before the next game, and we’ve just got to get back at it.”

After the poor first period had Washington trailing by one, the Capitals started to control play. They peppered Lundqvist with 22 shots on goal while limiting the Rangers to 11 of their own over the final two periods.

Lundqvist was up to the challenge until Kreider’s interference penalty 15:43 into the second period. On the ensuing power play, Ovechkin whiffed on one open look from his left faceoff circle office, but with 19 seconds left in the power play, he got the shot off from there. The puck went off Rangers defenseman Nick Holden before wobbling past Lundqvist to tie the score.

“It was kind of a lucky goal,” Ovechkin said. “I was mad because I missed pretty good chances before. It was kind of a frustrating moment, but it’s nice that it goes in.”

The first period was a collection of highlight-reel saves by Grubauer. Typically, Washington might have saved top goaltender Braden Holtby to play a division opponent like the Rangers, but because the team didn’t have morning skates before its matinee games Saturday and Sunday, Trotz thought playing Saturday after a Friday practice would be better for Holtby’s rhythm.

Plus Grubauer has played well this season, taking a 10-3-2 record into the game against the Rangers. On Saturday afternoon, Holtby faced 23 shots against the Red Wings. Grubauer nearly saw that many in the first period Sunday as the Rangers recorded 19 shots on goal with multiple odd-man rushes.

“It was good to get into the game, but that’s not the way we want to start, giving up those many scoring chances,” Grubauer said.

Grubauer slid into a split to make a right-pad save on Kevin Hayes 6:49 into the period, and then on the next shift he had to do the same to stop Pavel Buchnevich. Both shots came from within 10 feet of the net. A minute after Grubauer’s save on Hayes, the Capitals again found themselves reeling in their own end, and with a scramble in front of the net, defenseman Ryan McDonagh beat Grubauer with a high shot from the slot to lift New York to a 1-0 lead 7:49 into the game.

Washington was fortunate not to be trailing by more at first intermission. Two Brooks Orpik minors gave the Rangers power-play opportunities, and Zibanejad seemed to score on the second one. The Capitals challenged that the play was offside, and that was quickly confirmed to keep it a one-goal deficit.

The sluggish start was understandable considering Washington’s recent schedule. The Capitals had five days off the ice last week as part of their bye week, returned to a one-hour skate Friday and then had to play an afternoon back-to-back set of games on the road against two teams known for their speedy style of play. After Saturday’s slate of games, teams were 3-12-4 in their first games after the bye week.

As Sunday’s game went on, the Capitals started to feel like the team they were before their vacation from the ice. With Lundqvist sharp Sunday, that still wasn’t enough.

“We were just moving too slow, moving the puck too slow and not moving our legs quick enough,” Capitals defenseman Matt Niskanen said. “It showed. . . . We’re shaking off the rust a bit, but the second two periods is a step in the right direction.”