Ducks veteran winger Teemu Selanne has scored 552 goals during his 14-year NHL career. ((Mark Avery/Associated Press))

The Anaheim Ducks re-signed 10-time all-star Teemu Selanne to a two-year deal Sunday.

Selanne will earn $3.25 million this season and $2 million next year.

The team had to wait until trading defenceman Mathieu Schneider to Atlanta on Friday in order to make the deal possible, but remains $1.2 million US over the NHL's $56.7-million salary cap.

Still, the Ducks were able to free up $3.84 million, and the team has until the first day of the regular season to get under the cap.

"This is the only place I wanted to play," Selanne said in a release. "We have great owners, great fans and a chance to win again. This team is hungry and ready to go."

The 38-year-old veteran was contemplating retirement at the beginning of last year, and missed the majority of the season before returning in February.

He scored 12 goals and notched 11 assists in 23 games.

Selanne had to sign a tryout agreement earlier this month while the team was attempting to make a trade to clear space.

"We're happy to have Teemu back and thank him for his patience as we sorted out our salary cap situation," Ducks executive vice-president/general manager Brian Burke said in a release.

"Teemu is a true Duck. His loyalty to this franchise and community is unquestioned."

Selanne has spent 14 seasons in the NHL, scoring 552 goals and 1,158 points for Winnipeg, San Jose, Colorado and Anaheim. He was part of the Ducks' Stanley Cup-winning team in 2007.

With files from the Associated Press