When Washington Capitals center Nicklas Backstrom agreed to a five-year, $46 million contract extension with the only NHL team he has ever played for, he did so in General Manager Brian MacLellan’s office.

Backstrom, who was negotiating a new deal without an agent, had met with MacLellan in multiple places since October — on the road in hotel rooms and sometimes even after practice. But when they agreed on the final contract structure, it was only fitting that it happened in a city that both parties hope will be the first and last of the Swede’s NHL career.

“I had one goal in mind, and that was to stay here,” Backstrom said at a Tuesday news conference announcing his new deal. “I always dreamed of finishing my career here, and hopefully that will be the case. I love the city; I love the fans and love the organization. So it was no doubt in my mind. It would be really weird to put on a different jersey.”

The fourth pick of the 2006 draft, Backstrom is the Capitals’ career assists leader and one of just two players to record at least 900 points with the franchise. (Frequent linemate Alex Ovechkin is the other.) Backstrom is the only active player in the NHL who has recorded at least 50 assists in six consecutive seasons. Last season, he became the 26th player to achieve that; of the other 25, 23 are in the Hall of Fame.

This season, the last of his 10-year, $67 million contract, Backstrom has 35 points in 39 games for the Capitals (31-11-5), who lead the Metropolitan Division with 67 points.

“If you look at it from the reverse side, if he was going somewhere else, if we didn’t make a deal, how do you replace Nick Backstrom?” Capitals President Dick Patrick said. “They don’t grow on trees.”

And while Backstrom re-signing is good for the Capitals’ foreseeable future, the 32-year-old said he believes this contract will not be his last with the franchise. He called it a “good start,” and he will see what direction the team wants to go in five years. For now, one of the franchise’s longest-tenured players is locked in and eager for another Stanley Cup run.

“I am a born and raised Capital, and that is where I want to finish,” Backstrom said.

Backstrom and MacLellan met at least eight times during negotiations, and Backstrom said he enjoyed learning the ins and outs of the process. He said he would recommend negotiating your own contract to other players, but he added it was challenging to balance both roles at times.

“I honestly thought it was fun,” he said. “I have no negative things to say about it. It obviously helped that Mac didn’t play any games, I didn’t play any games. We were just honest with each other.”

Neither side set a timeline on when they wanted to get a deal done, but Backstrom said it was important to sign during the season. They agreed on the average annual value ($9.2 million) long before the final structure.

“I think both of us were happy with the way it was right now,” Backstrom said. “I have absolutely no negative things to say about it. We had a conversation. No yelling. No screaming. So that’s a good thing.”

Backstrom will take up about 11.3 percent of the salary cap of $81.5 million. That is essentially identical to when he signed his 10-year contract in 2010: His average annual value was $6.7 million, and the cap was $59.4 million, according to CapFriendly.com.

Backstrom said he didn’t pay close attention to those numbers because he “knew what [he] was worth,” and the conversation flowed from there. As for the length, MacLellan said he took Backstrom’s age into account, and they discussed proposals that were both shorter and longer.

“He’s in the right spots, understands the game, understands how to make players better,” MacLellan said. “He’s a playmaker; he’s a first power-play guy. I think those skills that he has age well, and he’ll be able to produce in his late 30s.”

The Capitals can now turn to the other key member of their 2018 Stanley Cup-winning roster playing on an expiring contract: goaltender Braden Holtby. ­MacLellan said the Capitals will revisit talks after the season and that they will have to get “creative” if they want to find room to re-sign their No. 1 goaltender.

“Holtby’s a big part of our success as an organization, and he’s in the mix with Ovi and Nick as defining our organization,” MacLellan said. “I think we had an open communication at the beginning of the year, and then we were going to address it at the end of the year to see where we’re at with cap and possibilities or not possibilities. So we’re going to play it out.”

Holtby, 30, signed his five-year, $30.5 million contract in 2015. He has a résumé that is similar to that of Sergei Bobrovsky, who signed a seven-year, $70 million contract with the Florida Panthers as a free agent in July. Asked in September whether he would offer a hometown discount, Holtby didn’t rule it out.

Ovechkin’s 13-year, $124 million contract signed in 2008 is set to expire after next season. Ovechkin cannot sign an extension until July 1. Backstrom and Ovechkin have expressed a desire to play with each other for as long as possible. Ovechkin told The Washington Post before the season that he had never thought about the pair possibly playing on different teams.

Backstrom said Tuesday that Ovechkin had been asking almost every day about the contract negotiations. Now that his deal is done, Backstrom said he’s likely to return the favor: “For sure," he said. "I’m going to call him every day to ask.”

Quipped MacLellan: “My only concern going forward is that maybe Ovi might hire Nick to do his next contract."