Ivan Barbashev signed a 5-year, $25 million contract to stay with the Vegas Golden Knights after Reilly Smith was traded to the Pittsburgh Penguins on Wednesday.

It has an average annual value of $5 million.

The 27-year-old forward had 45 points (16 goals, 29 assists) in 82 regular-season games for the Golden Knights and St. Louis Blues this season, including 16 points (six goals, 10 assists) in 23 games after he was acquired in a trade with the Blues on Feb. 26. He had 18 points (seven goals, 11 assists) in 22 Stanley Cup Playoff games and helped Vegas win the Stanley Cup, his second NHL championship after winning with St. Louis in 2019.

"It's not between Ivan and Reilly," Vegas general manager Kelly McCrimmon said. "… Internally we never made it a decision about one versus the other. I think what we did talk a lot about was Barbashev's impact on our roster when we acquired him from St. Louis. His ability to fit in so seamlessly with Jack Eichel and Jonathan Marchessault to give us a really good top line and I made the comment when we acquired Ivan ... that we've been looking for a player like this for some time. He's in the prime of his career, we gave up a good, young player to acquire him, he came in, he played extremely well, we won a Stanley Cup, he was a big part of that, we wanted to keep him. So, that's where the conversation began and from there, you start to go through different ways of addressing your salary cap and getting it to where it needs to be."

Selected by the Blues in the second round (No. 33) of the 2014 NHL Draft, Barbashev has 194 points (84 goals, 110 assists) in 433 regular-season games for the Golden Knights and Blues and 27 points (10 goals, 17 assists) in 72 playoff games.

The signing was announced shortly after Vegas traded Smith to Pittsburgh for a third-round pick in the 2024 NHL Draft. The 32-year-old forward, who has two years remaining on a three-year contract ($5 million AAV) he signed with Vegas on July 13, 2022, had 56 points (26 goals, 30 assists) in 78 regular-season games this season and 14 points (four goals, 10 assists) in 22 playoff games.

Smith ranks third in Vegas history in points (286), second in goals (124) and fourth in games (399). He has played all 88 playoff games in team history, along with forwards William Karlsson and Marchessault. Acquired in a trade with the Florida Panthers for the Golden Knights selecting Marchessault in the 2017 NHL Expansion Draft, Smith was one of six original members to win the Cup with Vegas this season along with Marchessault, Karlsson and forward William Carrier, and defensemen Shea Theodore and Brayden McNabb.

"I'd like to thank Reilly for his time in Vegas," McCrimmon said. "We're proud he leaves a Stanley Cup champion. I know he's going to get a good opportunity in Pittsburgh, I know he'll do well. …

"We have some free agents of our own that we are working on, Ivan Barbashev being one of those players that we signed to a contract today. We think this will give us the ability to pretty much return our team in whole. So that was our objective as we went into free agency. Unfortunately, to get there, we moved Reilly to Pittsburgh to facilitate some of the other moves that we want to make."

One of those remaining free agents for Vegas is goalie Adin Hill. McCrimmon said talks are ongoing.

"They're working really hard to make this happen, to help him remain a Golden Knight," McCrimmon said. "It's one of the things we still have to continue to work at to see where we finish with his status on our team."

Penguins coach Mike Sullivan said he's eager to have Smith on his side.

"As far as where he fits into our lineup, I'm sure we'll probably explore different options," Sullivan said. "But I think it just gives us that much more versatility.

"He's a real good player. He's going to make us a better hockey team without a doubt, we're convinced. We're really excited."