SAN DIEGO – The Padres have inked infielder Robinson Canó to a major league contract, the team announced Friday.

Canó, 39, has had a decorated — and, at times, controversial — big league career that placed him among the game’s best second basemen for years. He is an eight-time All-Star, a five-time Silver Slugger winner and won the World Series in 2009 as a member of the Yankees.

He signed a 10-year, $240 million deal with the Mariners in 2013, making the All-Star team three times there before being traded to the Mets in 2018 where he played until being released this season.

He’s twice been suspended under Major League Baseball’s performance-enhancing drugs policy, missing 80 games during the 2018 season and the entirety of last year after another positive test.

When he returned to the Mets this year, he struggled with a .195/.233/.268 slash line in 12 games.

But for his career, Canó’s numbers have been among the game’s elite. He has a lifetime .302 average and with 2,632 hits, he still may have a long-shot chance of reaching the 3,000 hit mark if he can be a productive member of a lineup, which remains to be seen.

Canó will wear No. 24 for San Diego and first base coach David Macias will switch to No. 46, the Padres said. Canó wears 24 to honor Hall of Famer Jackie Robinson, his namesake, whose No. 42 jersey is retired throughout Major League Baseball.

Right-handed pitcher Dinelson Lamet was optioned to the teams Triple-A affiliate in San Antionio, the team announced.

The exact terms of the contract between Canó and the Padres were not immediately disclosed by the team.