ANAHEIM, Calif. — The Anaheim Ducks signed holdout Hampus Lindholm to a six-year, $31.5 million contract through the 2021-22 season on Thursday, ending a stalemate with their talented Swedish defenceman.

The 22-year-old Lindholm scored 92 points in 236 games over the past three seasons, developing into one of the NHL's top young blueliners with a fluid two-way game. He also has 15 points in 34 playoff games for the Ducks.

"I'm really happy to be back in Anaheim," Lindholm said in a phone interview from Sweden. "That's where I've been all my career. This is the only time when we had time to sign me, and we could still keep some players. It was kind of perfect that way to keep the team that we had last year."

The Swede missed training camp and Anaheim's first eight regular-season games while holding out as a restricted free agent. Both sides wanted a long-term deal that recognized Lindholm as one of the NHL's top young players at his position, but the Ducks are run on a budget, and they're nearly out of salary-cap room in a payroll filled with large veteran contracts.

"I was hoping to get this done in the summer, of course, but that's just how it is," Lindholm said. "I can't do too much about that. You just have to try to get to the point where you agree."

Lindholm has been working out daily at home with a Swedish Elite League team, along with extra work at home. He expects to be ready to step into Anaheim's lineup after he gets his visa, although that process could take up to two weeks.

Forward Rickard Rakell, Lindholm's teammate and fellow Swede, ended his own holdout by agreeing to a six-year, $22.8 million deal with Anaheim on Oct. 14, but he didn't practice with the Ducks until Wednesday.

"I've been practicing hard," Lindholm said. "It's going to be exciting to come back and play some real hockey again."

Lindholm agreed to a deal worth slightly less than the six-year, $32.4 million deal signed by Buffalo defenceman Rasmus Ristolainen earlier this month. Winnipeg's Jacob Trouba is the NHL's only remaining restricted free agent without a deal, and he has asked for a trade.

Lindholm will make $3 million this year, $6 million in 2017-18, $6.75 million in 2018-19, $5.25 million in 2019-20, $3.75 million in 2020-21 and $6.75 million in 2021-22.

TSN Hockey Insider Bob McKenzie reports that the cap hit this season will be $5.73 million and then $5.2 million for the remaining five seasons. The variance is the result of Lindholm signing after the regular season has commenced, as per the league's Collective Bargaining Agreement.

"They wanted to sign me long term, and I had no problem with that," Lindholm said. "I think we got something we're both happy with."

The Ducks squeezed Lindholm's deal under the salary cap by putting defenceman Simon Despres and centre Nate Thompson on long-term injured reserve. Anaheim likely will have to make another move when either player returns from injury, but that might not happen for months.

"It was good this way, because now I can play and they didn't have to move anyone," Lindholm said. "We still have the same team, which is really good because I think we have a real strong back end. We have the guys left from the core group, so it's going to be an exciting year."