New York Rangers defenseman Jacob Trouba at Madison Square Garden...

New York Rangers defenseman Jacob Trouba at Madison Square Garden on Monday. Credit: Kathleen Malone-Van Dyke

The Rangers traded defenseman Jacob Trouba to the Anaheim Ducks for defenseman Urho Vaakanainen and a future fourth-round pick on Friday.

Trouba, 30, was in his sixth season with the Rangers, who had lost six of seven entering Friday night’s game against the Penguins. He was traded from Winnipeg to the Rangers in 2019 and became the captain before the 2022-23 season.

“I want to sincerely thank Jacob for his contributions to the Rangers and our community,” general manager Chris Drury said in a news release announcing the trade. “Jacob has been an example on and off the ice for our organization and played a major role in our success over the last several years. Since coming to New York five years ago and serving as Captain for the last three seasons, he has demonstrated grit, toughness and tremendous leadership and we can’t thank Jacob enough for everything he has done for the Rangers.”

The Rangers said at their morning skate that Trouba would not be in Friday night’s lineup. Asked then if Trouba has played his last game as a Ranger, coach Peter Laviolette said: “He’s not in the lineup tonight.’’

Laviolette also was asked if Friday was a difficult day.

“I mean, there’s always a human side to everything, right?’’ he said. “He’s a good person and a good player and a good leader. But today, when it comes to addressing this effort, taking time coming out of that game [Monday’s 5-1 loss to the Devils] and thinking about it, this is the decision that I made.’’

Laviolette was asked how much of the decision was his and how much of it was Drury’s.

“Chris and I are together on our thoughts,’’ he said.

Rookie Victor Mancini was called up from AHL Hartford and took Trouba’s place in the lineup.

Vaakanainen, 25, has one assist in five games for the Ducks this season. Last season, he posted career highs in games (68), goals (one), assists (13), points (14), hits (55) and blocked shots (79).

“Jacob is a highly respected player in this league whose character and leadership qualities on and off the ice are second to none,” Ducks GM Pat Verbeek said a team statement. “We believe Jacob has many more years in this league and hope he is a big part of our future success. It’s rare you are able to acquire a player with Jacob’s experience, stature and ability. On the ice he competes every shift, leads by example and is a presence on the blue line every night.”

Trouba has been a large part of the focus on the Rangers’ recent struggles, especially after the story broke that he and forward Chris Kreider were listed by name in a league-wide memo sent out by Drury declaring that he was looking to make trades to shake up the roster.

Drury tried to trade Trouba over the summer but was unable to do so because of Trouba’s 15-team no-trade clause. Trouba addressed the subject early in training camp, saying he was happy to be back on the team and wasn’t bothered by seeing his name in trade rumors.

“I wanted to stay here. I want to be here, I love living here. I love New York,’’ he said that day. “My family loves it here . . . I’m happy to be here and excited to be back for the start of the season.”

But the season has not gone well for the Rangers or for Trouba. The team started out 5-0-1 but entered Friday’s game 13-10-1 and barely holding on to the second and final wild-card playoff spot in the Eastern Conference. Trouba played in all 24 games and had no goals, six assists, 22 penalty minutes and a plus/minus rating of minus-3.

He has played with several different defense partners as Laviolette has tried to find a formula that would help the Rangers cut down on their turnovers, rush chances against, high-danger chances against and goals allowed. Trouba’s ice time lessened during the last few games.

In the locker room after the skate, the players in the room appeared to be stunned.

“As a player, as a teammate, as a friend and human being, obviously, we love him to death [for] what he’s done and what he does for us,’’ forward Mika Zibanejad said. “You can’t say it’s not tough, especially with coming in and you’re preparing for a game, you get to know about it.

“I don’t know what the book says about how you handle these things and what you do, but until there’s more information, we just got to try to focus on our game tonight. It’s a big one for us and need to get a win here, so we’ll deal with that later.”

“He’s an amazing teammate,’’ said K’Andre Miller, Trouba’s longtime defense partner. “He does everything he can for the team, for his teammates. Huge asset for our team. And yeah, we’re gonna miss him tonight.”

Kreider declined to talk about Trouba, saying, “It’s a game day, so we’re going to focus on the game.”

Asked again if he had thoughts he would like to share on Trouba, Kreider said, “Yeah, but not today. Today we got to focus on winning a hockey game.’’