NEW YORK — Vitek Vanecek wasn't supposed to be part of the Washington Capitals' goaltending duo to start the season. The plan had Ilya Samsonov sharing time with Henrik Lundqvist, the former Rangers star known around the league — and especially around New York — as "The King."

But those plans changed when Lundqvist, who signed with the Capitals in October, announced in December that a heart condition would force him to miss the season. Vanecek was thrust back into the picture.

So it was fitting that Vanecek found himself in net Thursday night on the ice that Lundqvist came to call his own while building his legend over 15 years in a Rangers sweater. The Capitals rookie was solid, turning aside 27 of 30 shots, but Washington's offense struggled in a 4-2 loss at Madison Square Garden.

"I thought we were a little slow getting out of the gate," Capitals Coach Peter Laviolette said. "Chances were fairly even, but just zone time I think went a little bit more to them. . . . Just made a mistake here or two throughout the course of the game and ended up costing us."

The Capitals dug themselves a 2-0 hole midway through the second period and never were able to get even, despite Alex Ovechkin's 709th career goal midway through the final period that cut their deficit to 3-2.

The loss was the second straight for the Capitals (6-2-3), who went undefeated in regulation through their first nine. The Rangers improved to 4-4-2.

Vanecek, while having his share of timely saves, was not flawless. The rookie has allowed three or more goals in seven of his nine starts.

The Capitals continued to be hamstrung by their penchant for taking penalties. They took four during regulation, all minors that took away from their offensive power, before Brenden Dillon and Kevin Rooney were whistled for fighting after the final horn.

Opposite Vanecek was fellow rookie Igor Shesterkin (3-2-1), who made 31 saves on the night. Shesterkin is splitting time with 24-year-old netminder Alex Georgiev. The Rangers had opted to go with two young netminders to replace Lundqvist after the team bought out the final year of the star's contract in late September. Sidelined because of his heart condition, Lundqvist is now far away from hockey, four weeks removed from open heart surgery, and Vanecek has the reins with Samsonov still in the NHL's covid-19 protocols.

However, he doesn't have a lot of tested help behind him.

With Samsonov out, 39-year-old Craig Anderson is the Capitals' No. 2 netminder. Anderson, while he spent the past 10 years with Ottawa, has yet to make an appearance for Washington. Vanecek has made eight straight starts dating back to Jan. 19 against Pittsburgh.

When asked if the team was concerned about Vanecek's workload, Laviolette downplayed any worry, noting Vanecek's age and the team's belief in his ability.

The Capitals, in the first of eight matchups against their division rivals, came out sluggish, and their defense was caught flat-footed on multiple occasions. It started early, when Rangers center Ryan Strome put the hosts on top 1:41 into the first period with his deflection goal off Adam Fox's point shot. Washington failed to have enough offensive zone time and the Rangers held a steady 15 to 8 shots on goal advantage in the opening frame.

The second period offered more of the same from the visitors. Washington failed to create early in the offensive zone, and when Garnet Hathaway was assessed a tripping call only five minutes into the period, the Capitals were never able to regain their footing.

The Rangers doubled their lead when defenseman Anthony Bitetto beat Vanecek with a crafty backhand at 9:15 of the second period. It was only Bitetto's third goal in his 185 career games. His last goal? Nov. 18, 2017 — when he played for Laviolette in Nashville.

Carl Hagelin's first goal of the season with 1:03 left in the second period gave the Capitals slight momentum, but the Rangers made it 3-1 with Strome's second goal of the night off an odd-man rush 7:55 into the third period. Jakub Vrana's dismal turnover in the offensive zone led to the rush the opposite way — and the eventual game-winner.

"If you don't have 100 percent effort or if you are not into the game full, it is going to be a hard period," Hagelin said. "We've done that too much. We haven't played a 60-minute game yet. It is time to adjust and figure that one out because I know if we do we are a very successful team."

Ovechkin struck about three minutes later to make it 3-2, but the Capitals would get no closer. Pavel Buchnevich's empty-netter closed out the scoring.

Ovechkin is now in sole possession of seventh on the NHL's all-time goals list, passing Mike Gartner. Next up is Phil Esposito at 717.

"Not done yet," Ovechkin said on passing Gartner. "Just try to enjoy my time right now and try to enjoy this moment. Team, obviously it sucks we didn't get the point, but, you know, beginning of the year just try to find our game. . . . Anytime we stop playing, it costs us some points, and it costs us the game."

The depleted Capitals had to go with 11 forwards and seven defensemen because of injuries. After Conor Sheary suffered a lower-body injury Monday night and was ruled out Thursday, the Capitals did not have enough salary cap space to call up a 12th forward to the active roster.

Ovechkin ended up taking multiple shifts with the shorthanded fourth line and had 27:17 minutes of ice time.

Five Capitals were unavailable in New York: Samsonov, Sheary, center Evgeny Kuznetsov, center Lars Eller and defenseman Justin Schultz.

Samsonov and Kuznetsov remain on the covid list with no timetable for their return. Eller missed his fourth game with an upper-body injury. Schultz missed his third game after taking a puck to the face last Thursday against the New York Islanders.

"Everybody goes through it, so there's no excuses here tonight," Laviolette said. "We needed a different result, we didn't get it, and we'll move on. I'm not sure what's available to us next game, but as we go through a couple days here, we'll see what our lineup looks like. But we expected to come in here and win, so that's what's disappointing."

Read more on the Capitals: