In a gym in Edmonton on Friday, Jared Spurgeon was working out right next to Tyler Ennis when Spurgeon’s brother’s cellphone rang.

It was agent Eustace King with exciting news, although the Wild defenseman was immediately conflicted.

On one hand, Spurgeon was losing Marco Scandella, his first roommate and defense partner with the Wild organization. On the other hand, Spurgeon was gaining Ennis — his childhood friend since they were five years old — as a new teammate.

“It’s pretty crazy to think that your best friend from growing up, two smaller guys that were told, ‘no,’ are going to be playing on the same NHL team together,” Spurgeon said.

In a move General Manager Chuck Fletcher believes makes the Wild better up front while also delivering “valuable cap space” to further maneuver this offseason, the Wild acquired Ennis, power forward Marcus Foligno and a third-round pick from the Buffalo Sabres for Scandella, former Sabres captain Jason Pominville and a fourth-round pick.

Ennis, 27, who grew up across the street from Spurgeon, is a similarly-statured 5-9. He’s a skilled winger and three-time 20-goal scorer coming off two injury-plagued seasons. Foligno, 25, is a 6-foot-3, 228-pound, punishing left wing who scored a career-high 13 goals last season and finished fifth in the NHL with 279 hits.

A potential move with Buffalo had been swirling since before last weekend’s draft. Fletcher plotted with expansion Vegas to take center Erik Haula for the purpose of protecting his top five defensemen so he could trade one.

By dealing Scandella, the Wild dished the remaining three years of his contract worth $4 million annually. By dealing Pominville, the Wild unloaded the remaining two years of his $5.6 million-a-year contract. Ennis has two years left at $4.6 million annually and Foligno is a restricted free agent that’ll need to be re-signed after making $2.25 million last season.

The trade created $5 million in cap space. That’ll not only allow the Wild to pursue a center like perhaps Matt Cullen and a right-shot defenseman when free agency opens Saturday, the Wild will now be able to comfortably re-sign Mikael Granlund and Nino Niederreiter and have protection against, albeit a rarity, predatory offer sheets tendered to the restricted free agents in the coming days.

“We’ve made the playoffs five consecutive seasons, but our goals are much greater than that,” Fletcher said. “This summer’s an opportunity to retool a little bit and to bring in some fresh blood and try to add a couple different pieces that maybe we’ve been lacking and yet also deal with the challenges that we’ve been facing in terms of the expansion draft and salary cap that stayed relatively flat.”

Fletcher said the Wild had been chasing Foligno for a couple seasons. The son of former NHLer Mike Foligno is also the younger brother of Columbus Blue Jackets captain Nick Foligno, whom the Wild will face in Marcus’ home debut Oct. 14. Marcus Foligno’s nickname is “Moose” because once he became the “bigger younger brother” to Nick as a kid, “I was uncoordinated [on the ice] like a moose.”

Fletcher feels Foligno’s the type of player the Wild has lacked, particularly in the playoffs. In six seasons over 347 games, Foligno scored 116 points, 334 penalty minutes and had 1,023 hits.

“You can put me in different roles, you can use me in different scenarios,” Foligno said. “I’m going to be a hardworking forward that sticks up for teammates. … I’m excited because you want to push for the playoffs every season and I haven’t done that yet with Buffalo. Minnesota’s definitely a team that’s built for success in the playoffs. I’m just hoping I can come in there and just be a small voice but hopefully have a big impact.”

Ennis, Buffalo’s longest-serving player eight seasons in, was in need of a fresh start. He scored 97 goals and 236 points in 419 games but coming off a five-goal, 13-point season in 51 games.

“It feels almost like a dream come true playing with Jared,” he said. “I’ve had injury trouble the last couple years, but I feel great, I feel as good as I ever have. I think Minnesota will like the way I play. I can’t wait to get going. I’m so pumped.”

Spurgeon said of his bosom buddy, “He’s very offensive minded and he can pull off some pretty crazy moves.”

Less than a year after Scandella previewed the 2016-17 season by forecasting, “It could be our last year as a group,” Scandella indeed was the defenseman chosen to depart. Drafted in 2008 and debuted in 2010, he was the second-longest tenured Wild player. He scored 89 points in 373 games and was coming off two up-and-down seasons in a row. Scandella will be “a beast,” Pominville said.

Pominville, acquired from Buffalo in 2013, scored 76 goals and 206 points in 327 games with the Wild. It’s believed he didn’t waive his no-move clause for expansion purposes a few weeks ago and figured he could be on the move with the Wild “crunched” salary-cap wise.

“If there was going to be something that was going to happen, Buffalo was definitely a place that me and my family was hoping for,” said Pominville, who has two young children. “I mean, my little guy already has his jersey on, so he’s pumped and we’re excited.”