New York Yankees designated hitter Alex Rodriguez will end a 22-year career in baseball next Friday, the three-time American League MVP and 14-time All-Star announced with the team on Sunday.

Rodriguez will play his final game on Aug. 12 at Yankee Stadium against Tampa Bay, he told a packed news conference ahead of Sunday’s home game against Cleveland. After Aug. 12’s game, Rodriguez will be unconditionally released from his contract and join the Yankees as an adviser and special instructor in a deal that will last until Dec. 17, 2017.

“This is a tough day,” Rodriguez, joined by his teammates, said at the news conference. “I love this game and I love this team. And today I’m saying goodbye.”

“We all want to keep playing forever,” he added. “But it doesn’t work that way.”

The announcement marks the end of a prolific, yet often controversial baseball career. In 2007, Rodriguez signed a $275 million, ten-year contract with the Yankees, the most lucrative contract in the sport’s history at the time.

Rodriguez scored 696 home runs during his career, trailing only Barry Bonds, Hank Aaron and Babe Ruth in the all-time count. The 41-year-old athlete, however, has seen a slump recently, relegating him to the bench in much of the past month. He is currently hitting .204 this season, with nine home runs and 29 RBIs at-bat.

“After spending several days discussing this plan with Alex, I am pleased that he will remain a part of our organization moving forward and transition into a role in which I know he can flourish,” Yankees managing general partner Hal Steinbrenner said in a statement.

Rodriguez said that he thinks his adviser-instructor duties will begin at spring training next year.