Capitals defenseman Christian Djoos finds the gaping net for a 2-0 first-period lead as Devils goalie Cory Schneider is late covering Saturday night at Capital One Arena. (John McDonnell/The Washington Post)

In their last game of the calendar year, the Washington Capitals knew exactly what was at stake against the New Jersey Devils.

“Whoever wins is in first place at the end of the night,” defenseman Brooks Orpik said before the game.

With sole possession of the Metropolitan Division lead on the line, the Capitals handled the Devils, 5-2, in one of the team’s best all-around performances in weeks. The win was a statement of sorts that while New Jersey might be the young team on the rise, the reigning division champs are not yet ready to yield the floor.

Through 40 games, the Capitals have 51 points, the most in the division and the third-most in the league. Before the game, Washington Coach Barry Trotz said the Devils have been one of this season’s best stories, surprising the league after missing the playoffs a year ago. Meanwhile, the Capitals, the NHL’s best regular season team the past two years, were discounted after some offseason departures, including Marcus Johansson’s trade to New Jersey.

But Washington has found its footing in December, going 10-2-2 as it climbed back to the top of a competitive division with very little separating the top team from the bottom.

“Division games are important,” defenseman Matt Niskanen said. “These guys have been a tough team this year. They’re going really good, so it’s nice to beat them. They’re going to be there at the end of the year. We’re going to be slugging it out with these guys and a few other teams the whole rest of the way.”

It certainly seemed to be a motivating factor against the Devils. Against a team and a goaltender (Cory Schneider) playing a second game in as many nights, the Capitals got the strong start they needed. Trotz made some lineup tweaks before the game, scratching skilled forward Andre Burakovsky and moving Tom Wilson to the third line with center Lars Eller and winger Brett Connolly.

That trio scored two goals when Trotz put them together in the second period Thursday night against Boston, and on their first shift Saturday, defenseman Christian Djoos skated around the net as Wilson held his position directly in front of Schneider. Djoos dished the puck to the slot as he made his way around the cage, and Wilson snapped it past Schneider for a 1-0 lead less than three minutes into the game.

“That was more of a complete game,” Trotz said. “We said, ‘Let’s jump on this team. Let’s go after them. They’re a team that attacks and plays fast. Well, we’re going to have to play faster and make quick decisions.’ I thought we did that.”

Djoos was involved on Washington’s second goal as well. He carried the puck into the offensive zone before passing to Alex Ovechkin. Ovechkin then found Nicklas Backstrom, and Backstrom made the cross-ice feed back to Djoos, who finished the sequence with a shot into a half-open net for his third goal of the season.

Ovechkin finished with three assists, and the tally was Djoos’s first in 24 games, though his role on the team has steadily grown. Washington has been playing him more with top defenseman John Carlson, perhaps slowly building the 23-year-old rookie up to a top-four role.

“It’s confidence,” Niskanen said. “He’s getting better and better, learning how to defend and use his positioning and his stick work to defend. He’s kept his confidence throughout with the puck. I think you can see his ability. He’s got the guts to make a play, and it’s nice to see him contribute like that. He’s got a lot of skills.”

He certainly looked deserving of more responsibility Saturday night with a goal and a primary assist less than 12 minutes into the game. John Moore halved Washington’s lead 17:35 into the first period, but Djoos helped the Capitals build it back up 5:34 into the second frame when he drew an offensive zone holding penalty by New Jersey’s Pavel Zacha.

On the subsequent power play, Washington’s first, Carlson’s slap shot lifted the Capitals to a 3-1 lead. He finished with a three-point night for 31 on the season just 40 games in, making him the second-most productive blue-liner in the NHL. A third Washington defenseman scored in the third period when Niskanen finished a Devante Smith-Pelly pass on a tic-tac-toe play similar to the one earlier in the game.

Smith-Pelly and Ovechkin hugged and celebrated behind the net after that fourth goal, special to Smith-Pelly in part because he played for the Devils last season. The other three players on the ice joined in for a circle, victory and first place in the division all but assured at that point.

And just to be safe, Backstrom added an empty-net tally in the last minute as the Capitals closed the year on a high note.

“To me, it’s about playing well,” Trotz said. “We are where we are. I’m not so concerned. I just want to get into the dance and playing well.”