BOSTON — Facing the prospect of Mikko Rantanen becoming an unrestricted free agent after this season, Colorado general manager Chris MacFarland felt the timing was right to trade the star forward and bolster the Avalanche’s roster for the future.

“I think it was just a tough business decision here for us,” MacFarland said before the Avalanche’s 3-1 loss at Boston on Saturday. “I felt that the pieces we got made sense to strike now.”

Colorado parted with Rantanen in a three-team deal on Friday, shipping him off to Carolina while acquiring forwards Martin Necas and Jack Drury, as well as a second-round pick in this year’s draft and a fourth-rounder in 2026.

“I think a lot of the guys are just shocked,” Avalanche center Nathan MacKinnon said after the loss to the Bruins. “It’s pretty crazy someone like that getting traded. … He’s (been) a big part of our team, our culture. He’s been here from the dog days, in ’16, ’17 right up until now. It’s helped grow this organization up to a Stanley Cup winner and being a contender every season, a big reason why is because of him.”

Carolina also got forward Taylor Hall from Chicago in the trade.

Drafted 10th overall in 2015, the 28-year-old Rantanen, who scored an Avs-record 55 goals in 2022-23, was in line to become an unrestricted free agent after he and the organization couldn’t agree on a new deal entering this year.

“There are not many trades that are bigger in a year than Mikko Rantanen changing teams,” Hurricanes general manager Eric Tulsky said. “We came into this year with not very much cap space, and we’ve worked very hard with our roster to build up what we could to have the opportunity to take advantage if something like this came along.”

Rantanen had 25 goals and 39 assists at the time of the deal. He departs Colorado with 287 career goals in nine-plus seasons. He helped the Avalanche win the Stanley Cup in 2022.

Trading a superstar is never easy, and MacFarland certainly had some anxious moments.

“It hurts, right. He’s a home-grown talent. He’s a superstar person, he’s a superstar human being,” he said. “I think that’s sports, right. We’re going talk about it, people are going to talk about it. Your heart strings get tugged. That’s why we all do this.

“He’s that good of a hockey player. … He had the UFA card and we felt this is what we had to do.”

Now Colorado continues with the tough task of trying to remain a Stanley Cup contender while planning for the future.

“You lose a superstar and we’re going to have to try and replace him in the aggregate — 50-goal scorers don’t grow on trees,” MacFarland said. “You have to usually draft and develop them. Mikko was a home run for us for many, many years.”

Next up for Rantanen — assuming Carolina keeps him through the March 7 NHL trade deadline — is helping the Hurricanes go for their first championship since 2006.

Carolina coach Rod Brind’Amour, who was part of a midseason trade from the Philadelphia Flyers to the Hurricanes in January 2000, said he doesn’t want to put too much on Rantanen and Hall right away.

“It’s a whirlwind when you get traded,” said Brind’Amour, who served as Carolina’s captain when it won the Stanley Cup in 2006. “Especially when you’ve been somewhere a long time.”

The acquisition of Hall — a 33-year-old forward who was the top overall pick by Edmonton in 2010 — was a key part of the deal for the Hurricanes, according to Tulsky. Hall has 275 goals in 878 career games. He won the Hart Trophy as the league’s MVP with New Jersey in 2017-18, when he had a career-high 93 points.

“Taylor is a huge piece too,” Tulsky said. “One of the things we thought our team needed was an upgrade of skill and offensive punch. Marty (Necas) is one of the most skilled players in the league and he’s going back. It’s not easy to upgrade the skill level. But Mikko is an incredible offensive force and Taylor brings a lot of skill and some size and some speed. We think he’s going to fit.”