As the Washington Capitals wrapped up practice, Coach Barry Trotz tapped center Lars Eller on the back of the leg and delivered some news to the team. The sound of hooting and sticks smacking the ice filled the rink. Gloves began patting Eller on the head, and Andre Burakovsky happily embraced him. With a new five-year, $17.5 million contract inked Saturday, Eller cemented what’s he’s felt for a while now: This is home.

“He’s said that to me a few times,” Trotz said.

The 28-year-old third-line center was scheduled to be an unrestricted free agent this summer, and the new deal extends his current $3.5 million cap hit for five more seasons. Eller’s deal does not include no-trade or no-move protections, according to a source. Eller still has never gotten an opportunity to test the open market, and because middle-six centers are such a commodity, it’s possible Eller would have fetched a better deal in free agency than the one he signed with Washington.

“I’m only going to have one time to be an [unrestricted free agent] when I’m still in my 20s and that’s a once in a lifetime opportunity, but looking at the options, I wanted to stay here,” Eller said. “ . . . You could possibly get a better deal, but you don’t know where, what kind of team. There’s a risk and reward. You had to make some decisions, but I made the decision that I wanted to be here.”

Staying with the Capitals offered Eller a certain security that’s helped put him on pace for a career year, with 11 goals and 17 assists through 53 games. During his six seasons in Montreal, Eller bounced around the lineup, playing wing and center, top-six and bottom-six. That ended with the Canadiens trading Eller to Washington before the 2016-17 season, and Eller has centered the third line with the Capitals from the first game he put on the uniform.

The new deal also gives the Capitals some stability going forward. The team’s top three centers — Nicklas Backstrom, Evgeny Kuznetsov and Eller — are now signed through the 2019-20 season. Fourth-line center Jay Beagle is a pending unrestricted free agent.

“It’s huge,” General Manager Brian MacLellan said. “If you get four good centermen, it’s a strength of a team. That’s how you build your depth in your lineup.”

Said Trotz: “Everybody in the league is dying for centerman. And we have a lot of them. . . . I think every good team, it doesn’t matter what sport, if you’re strong up the middle, you’ve got a chance. We’re strong at the center position and we’re strong at goal, and if you give us a year or two to get some young guys coming in at defense, that’ll be a strength for us as well. I think we’re in a good position.”

The consistency at center has helped Washington overcome the offseason departures of two top-six forwards, and the team is once again atop the Metropolitan Division. Eller’s best asset is puck possession, and his line with forward Brett Connolly has been arguably the Capitals’ most dependable.

In-season contract extensions have been a rarity during MacLellan’s four-season tenure, but with the salary cap projected to rise to $79 million for next season and the trade deadline looming at the end of the month, MacLellan saw an opportunity to strike one item off his to-do list early. Defenseman John Carlson is now the team’s main free agent priority, as the 28-year-old right-shot is expected to command a hefty raise from his current $3.96 million cap hit.

“I’m not going to comment on negotiations, but we’re going to do everything we can to bring him back, yeah,” MacLellan said. “We’ve had talks with his people.”

The Capitals are hopeful that Carlson will also value the comfort of staying in Washington over the allure of testing free agency. In making his decision, Eller wanted to continue to play for a competitive team, and he expects the Capitals to stay that way with the team’s star players all signed for multiple seasons. He has relished learning from Backstrom and Kuznetsov, and along with his penalty kill responsibilities, Eller’s gotten more power-play opportunities this season.

As he took a seat at his dressing room stall on Saturday, his teammates continued to hoot and congratulate him on the new contract.

“You know, the house next to mine is on sale,” forward T.J. Oshie said.

“Where are you buying dinner tonight?” Backstrom called out from across the room.

“I’m really happy to be standing here today,” Eller said. “This club and this city has been a great fit for me personally, for my family. There’s just so many things that have been good about it. It’s been good for my career. I’ve found my game here, especially this year. I couldn’t be happier to make this happen.”

Read more on the Capitals: