Alex Rodriguez gets emotional discussing his departure from the Yankees. He will play his final game in pinstripes Aug. 12 against the Rays. (1:46)

NEW YORK -- The Yankees announced Sunday that Alex Rodriguez will play his final game in pinstripes Friday, then assume a position as a special adviser and instructor with the team.

Following Friday's game, Rodriguez will be unconditionally released by the Yankees from his player contract in order to sign a contract to serve in his new role with the organization through Dec. 31, 2017.

"This is a tough day. I love this game and I love this team,'' Rodriguez said, often choking up during Sunday's news conference. "And today I'm saying goodbye.''

Rodriguez, 41, said the agreement arose out of conversations over the past few days with Yankees managing general partner Hal Steinbrenner. Relegated to little more than a spare part lately, the three-time AL MVP said "the last four weeks have not been fun.''

"It's been very painful and embarrassing to sit on the bench. It's been awkward,'' Rodriguez explained.

Yankees general manager Brian Cashman, however, acknowledged that Rodriguez has a right to change his mind and pursue any potential opportunity. And for his part, Rodriguez never used the word "retire.''

So, if another team offered him a chance to play, would he consider it?

"A lot's happened the last 72 hours,'' Rodriguez said. "You know, when Hal told me, I just told him: 'Give me a few days. I need to kind of think on this, sleep on it.' I have not thought past the pinstripes, and my horizon is Friday. And, I haven't thought much more than that.''

A+ numbers for A-Rod Here is where Yankees slugger Alex Rodriguez ranks all-time in career major offensive categories. Total Rank HR 696 4th RBI 2,084 2nd Hits 3,114 19th Total Bases 5,811 6th Runs 2,021 8th Grand Slams 25 1st Strikeouts 2,285 5th --ESPN Stats & Information

Yankees manager Joe Girardi said he'd talk to Rodriguez about possibly playing this week in Boston before the team returns home.

"He's earned the right for us to sit down and have a conversation,'' Girardi said, later adding, "If he wants to play in every game, I'll find a way.''

The Yankees, who are pushing to play younger players, are contractually obligated to pay Rodriguez the remainder of his $21 million salary for this season and the $21 million he is owed for 2017, the final season of a 10-year, $275 million contract that was the largest in Major League Baseball when he signed it.

Cashman confirmed that Rodriguez and the team did not reach any type of settlement regarding the remainder of his contract. Rodriguez, therefore, will be paid the full sum still owed on his deal, which is approximately $27 million.

When asked if the Yankees considered letting Rodriguez play on another team in order to reach certain home run milestones, Cashman said no teams reached out to the Yankees to inquire about trading for him.

Rodriguez has won three MVPs and has made 14 All-Star teams during his 19 full seasons in the big leagues. He is fourth on the all-time home run list with 696, trailing leader Barry Bonds (762) by 66.

"Of course I think I can play baseball. You always think you have one more hit in you,'' Rodriguez said. "That wasn't in the cards. That was the Yankees' decision, and I'm at peace with it.''

"We all want to keep playing forever. But it doesn't work that way."

With Brett Gardner, Brian McCann and his teammates in attendance at a packed news conference, Rodriguez said he was thankful he would get a few more at-bats in front of family and friends.

"We all want to keep playing forever," Rodriguez said. "But it doesn't work that way."

Rodriguez's announcement comes just two days after Yankees first baseman Mark Teixeira announced he would retire at the end of the season.

"I think the ultimate way to go out is to go out on your own terms and Tex is getting an opportunity to do that, and it's sad to see that Alex isn't," Gardner said. "If we had played better collectively as a team things wouldn't be unfolding this way. It's something that's kind of hard to swallow. I've been around for a little while and it's sad to see Alex going like this."

Statistically speaking, Rodriguez is a first-ballot Hall of Famer, but he may never get in because he was suspended a then-record full season in 2014 for performance-enhancing drug use. It was the second time he had admitted to using PEDs.

The Yankees had essentially made Rodriguez a full-time bench player this season one year after he was a vital member of the lineup during his 33-home run comeback in 2015. But he never could get going in 2016, hitting just .204 with 9 home runs and 29 RBIs in 62 games. His OPS is .609.

Rodriguez recently sounded at peace with being cut, saying he would go home to Miami to spend more time with his daughters. Rodriguez mentioned his daughters this spring when he told ESPN he planned to retire following the 2017 season.

Rodriguez was drafted by the Seattle Mariners as the No. 1 pick in 1993. By 1996, at 20, he was an All-Star and second in the MVP voting after leading the league in average at .358 and home runs at 36.

Alex Rodriguez will be released after Friday night's game against Tampa Bay at Yankee Stadium, ending one of the most prolific and polarizing careers in baseball history. EPA/JASON SZENES

By the time he was 25, he left Seattle for Texas for what was then the largest contract in American sports history, a 10-year, $252 million deal that exactly doubled the $126 million the Minnesota Timberwolves' Kevin Garnett was due to earn.

Though he personally produced for the Rangers, the marriage would last only last three years. After winning the MVP in Texas in 2003, Rodriguez was nearly dealt to the Boston Red Sox, who were still in the middle of their 86-year championship drought. A trade for Manny Ramirez was agreed upon, but it was foiled by the MLB Players' Association, which wouldn't allow Rodriguez to give back money from his initial contact.

With Derek Jeter at shortstop and Aaron Boone -- who had just beaten the Red Sox with a game-winning home run in Game 7 of the American League Championship Series -- at third base, the Yankees did not have a need for Rodriguez. But when Boone tore ligaments in his knee playing pickup basketball, Cashman swooped in, dealing Alfonso Soriano and Joaquin Arias for Rodriguez. The Rangers chose Arias over a minor leaguer named Robinson Cano, who was on a list of players from which Texas could choose. Texas also paid $67 million of the $179 million that Rodriguez was still owed.

Rodriguez agreed to move from shortstop to third base in order to play next to Jeter. Rodriguez went on to win three MVPs, and he finally shook off his postseason troubles by leading the Yankees offensively during their 2009 World Series run.

Prior to that season, Rodriguez first admitted to PED use after a Sports Illustrated story outed him.

Rodriguez said after the SI story that he was a changed man, but his involvement in Biogenesis and subsequent fight to try to overcome the allegations led him to file lawsuits against baseball, the players' association and a team doctor. He questioned the integrity of then-commissioner Bud Selig, as well as other executives, during a controversy-filled attempt at a defense.

There was a thought Rodriguez may never play again after the suspension, but with the Yankees still owing him $61 million, Steinbrenner decided to let him return.

Rodriguez, looking for forgiveness, carried himself with contrition and helped lead the Yankees to an AL wild-card berth in 2015.

This year, though, he and the team have not had the same results.

ESPN's Andrew Marchand and The Associated Press contributed to this report.