As has been the case for most of the season, John Carlson and John Klingberg had been side-by-side on the leader board entering Tuesday’s game against each other at Capital One Arena. Washington’s Carlson had 14 goals and 45 assists for 59 points. Dallas’s Klingberg had seven goals and 52 assists for 59 points. No other defensemen had scored more.

“The guys are constantly joking about it,” Carlson said.

They stayed tied Thursday night, but it was Carlson who was pounding his fist in celebration after he slapped a puck past Stars goaltender Kari Lehtonen with less than five minutes left in regulation, the decisive goal in a back-and-forth 4-3 Capitals win that gave them a four-point cushion for first place in the Metropolitan Division. This marked Washington’s first win against Dallas in Chinatown since 2006.

The goal, coupled with Carlson’s assist on Alex Ovechkin’s second-period goal, matched Klingberg’s two assists to leave each blue-liner at 61 points (a career high for both players). But it was Carlson, who has eight points in his past six games, giving his goaltender a victory hug after his 24-save performance.

“I thought John, obviously getting the game-winning goal, he trumped it,” Capitals Coach Barry Trotz said of the in-game competition between Carlson and Klingberg.

The Capitals expected a desperate effort from the Stars, who entered the game just two points out of the second wild-card spot in the Western Conference. Dallas had gone 0-3-2 on this six-game road trip, so a visit to Washington presented a last chance to salvage it.

The Capitals knew to be wary of the Stars’ power play, which had scored on six of its previous 15 opportunities in the past six games, but two offensive-zone penalties by center Nicklas Backstrom proved costly in the first period. Stars forward Tyler Seguin beat Braden Holtby with a snap shot from the left faceoff circle on Dallas’s first power play of the game, lifting the Stars to an early lead. Klingberg recorded the secondary assist.

The Stars presented a considerable test for Holtby, the rare team that he has ugly numbers against — a career .859 save percentage and a 4.32 goals against average. Holtby’s teammates didn’t help him by taking four minor penalties in the first 30 minutes.

Ovechkin went to the box for interference less than two minutes into the second period, and a strong penalty kill effort by Washington seemed to spark a turning point. The Capitals got two shorthanded shots on goal, and 17 seconds after Ovechkin’s penalty expired, T.J. Oshie punched in the rebound of an Ovechkin shot.

With Ovechkin’s arm around his shoulder, Oshie kicked up his leg in celebration, mimicking the bobblehead of him that was handed out to fans in attendance Tuesday night. The impersonation continued as Oshie got back to the bench and wobbled his head for several seconds. Just four games ago, he had been in the midst of a 19-game goal drought. He now has four goals since Thursday’s game against the Islanders, encouraging for a player who didn’t have an even-strength goal in this calendar year until then.

“I like where T.J. is going right now,” Trotz said. “That’s the T.J. Oshie I’m used to seeing. . . . He’s ramping his game up at the right time.”

Less than two minutes after Oshie’s goal, defenseman Matt Niskanen’s point shot was tipped by a Stars player, sailing past goaltender Lehtonen. But Washington’s 2-1 lead was short-lived thanks to another penalty. Defenseman Michal Kempny was called for interference, and just after his penalty expired, Klingberg put a shot on net. Forward Alexander Radulov was right in front of Holtby, redirecting the puck with the shaft of his stick to tie the game.

Washington’s power play answered less than two minutes later with an Ovechkin one-timer from his left faceoff circle sweet spot, assisted by Carlson at the point. But then a Lars Eller giveaway led to Dallas captain Jamie Benn beating Holtby on a breakaway with 1:45 left in the second period, knotting the game at three goals. Eller didn’t see another shift until more than six minutes into the third period.

With 4:59 left in the game, Eller passed a puck over to Carlson in the faceoff circle, setting up the game-winning one-timer.

“He’s always been steady,” Holtby said of Carlson. “I think his role’s expanded, obviously, which shows — time on ice and points and such. He’s got all the tools of a great defenseman. He’s playing that way all year, a huge part of why we’ve had success. And he’s finding the net, hitting the net and good things happen. Every zone of the ice he’s playing strong right now.”