It was a classic scene in the latest installment of a heated rivalry: The Washington Capitals and Pittsburgh Penguins were both pushing Sunday afternoon, and the puck flew up and down the ice and bodies slammed into each other as the home team tried to rally in the third period.

The Capitals had a plethora of scoring opportunities down the stretch — including an electrifying goal from Lars Eller with 2:18 to play — but Pittsburgh held on during a physical, high-energy final period to beat Washington, 4-3, at Capital One Arena.

“The third was definitely closer to our identity, and sometimes until you get everybody in your group involved in a rivalry, you don’t understand what it really means,” Capitals Coach Todd Reirden said. “It took us two periods to get to that, and then when we were in the third we gave ourselves a chance. Unfortunately [we came] out a goal short.”

Unable to fully overcome a pair of two-goal deficits in the third period, Washington (35-13-5) ­faltered as self-inflicted errors were the difference against surging Pittsburgh (33-14-5). The NHL-leading Capitals have dropped two of three after a four-game winning streak, and the Penguins are only four points behind in the Metropolitan ­Division with a game in hand.

The Penguins led 3-1 after two periods before Evgeny Kuznetsov got the arena buzzing with his 18th goal of the season six minutes into the third. His backhander hit a Penguins defenseman and floated toward the net before beating goaltender Matt Murray for his second goal in as many games.

And while Kuznetsov’s tally ignited the Capitals, they couldn’t beat Murray again until after Pittsburgh had reestablished a two-goal cushion. The Penguins’ Brandon Tanev fluttered one past Washington rookie goaltender Ilya Samsonov with 2:33 left, so when Eller scored his second goal of the game 15 seconds later, it wasn’t enough to pull the ­Capitals even.

“He’s a horse for us every night,” Capitals forward Tom Wilson said of Eller, who has 13 goals. “He works extremely hard. He takes care of himself. He’s a great pro. On a night like tonight he’s just one of those players that, when he’s going, he can’t be ­denied.”

Sunday’s meeting was the first between the rivals this season. The teams will meet again in three weeks, back in the District.

“I liked the third period from our group,” said Wilson, who had a game-high 13 hits. “We’ve got to correct a few things, but we’ll keep working, and we’ll be ready for them next time.”

Samsonov was far from flawless after getting the nod for the marquee matchup over Braden Holtby. In his first appearance against Pittsburgh, the Russian gave up two goals on the Penguins’ first nine shots before settling in to finish with 29 saves.

The loss was Samsonov’s first since Nov. 15 against Montreal, snapping a streak of 11 straight winning decisions and leaving his record at 16-3-1. Reirden downplayed the decision to play his rookie goaltender against a top divisional foe, citing the importance of preparing both goalies for the remainder of the season.

“I thought he was fine,” ­Reirden said. “I think a couple bounces don’t go his way, so I’d probably like that back, but we’ll learn something about him and how he can be a little bit more solid in his next opportunity in a game of this magnitude.”

Washington’s ailing power play struggled again Sunday, going 0 for 3 as the team continued to tweak its first unit. Minor penalties also continued to be an issue, but Washington killed off all six of Pittsburgh’s power-play ­chances.

After the Capitals jumped to a 1-0 lead on a wrister by Eller 10:38 into the first period, the Penguins responded with quick goals by Sam Lafferty and Patric Hornqvist. Lafferty beat Samsonov high on the short side at 11:46, and Hornqvist’s tally came at 12:40 on a redirection from the front of the net.

Pittsburgh’s Dominik Simon scored the only goal of the second period, beating Samsonov with a backhander through the five-hole with 8:01 left in the period.

The Capitals picked up the pace in the third period, but they ultimately fell to 7-11-1 when trailing after two.

“We [have] played well for the most part of the season,” Eller said. “Today was just not our best for 60 minutes, and that’s it.”

Read more: