Oh, and there was a game, too.

Two hours after Alex Rod riguez announced that Friday will be his final game in pinstripes, the Yankees took the field Sunday and beat the Indians, 3-2, in front of 39,720 at the Stadium.

As has been the case much of the last month, A-Rod did not play, watching from the bench as Masahiro Tanaka turned in one of his best outings of the season and the offense produced just enough against righthander Carlos Carrasco.

The Yankees (56-55) won the season series against the AL Central-leading (but recently struggling) Indians, 5-2.

“I’ve said all along, I feel like we have a good team,” Brett Gardner said, attempting to explain the Yankees’ success against Cleveland (62-47), which features one of the sport’s top rotations and offenses. “I know we’ve been inconsistent and we’ve disappointed. It’s been frustrating for all of us involved, but we’re still playing hard, still playing to win, and we’re not giving up.”

Tanaka, coming off Tuesday night’s start against the Mets in which he allowed a season-worst seven runs (six earned) in a 7-1 loss, allowed six hits and no walks and struck out a season-high eight in six innings-plus. He was charged with one run, which scored on Roberto Perez’s single off Adam Warren in the seventh.

advertisement | advertise on newsday

“It was probably his best start of the year,” Girardi said. “I thought his stuff was really, really good. To shut this team down, I thought he was tremendous.”

The Indians, who scored seven runs (three earned) off Tanaka on July 10, entered Sunday ranked second in the American League in runs (542) and fifth in homers (144).

Tanaka, through his translator, agreed with Girardi, saying “possibly” it was his best outing of the season. “I felt really good out there,” said Tanaka, who turned in the first quality start by a Yankee since Nathan Eovaldi on July 30. “I do feel that I pitched well.”

Tanaka (8-4, 3.32) departed after a leadoff double by Rajai Davis in the seventh. After allowing the inherited runner to score, Warren stranded two runners, getting out of the inning when Mark Teixeira made a sliding stop deep behind the bag on Francisco Lindor’s ground smash and beat Lindor to the bag with a glove-first dive for the third out.

“A really impressive play,” Girardi said.

Yankees videos

Warren (one inning) and Tyler Clippard (two-thirds of an inning) served as a bridge to Dellin Betances, who came on with Jose Ramirez on third and two outs in the eighth.

Betances walked Davis and, with Tyler Naquin at the plate, threw a wild pitch that made it 3-2. He struck out Naquin to end the inning, then pitched a scoreless ninth for his second save, aided by a double play started on a nice backhand grab by Starlin Castro after Chris Gimenez’s leadoff single.

The Yankees were outhit 8-5, but it took them only one pitch to get a rally going. Gardner led off the first with a triple to left-center and scored on Jacoby Ellsbury’s sacrifice fly to make it 1-0. In the fourth, Didi Gregorius lined a hanging 2-and-2 curveball into the seats in right for his 13th homer. Teixeira, who on Friday announced his intent to retire at season’s end, lined an opposite-field RBI double to left with two outs in the fifth to make it 3-0.

Carrasco (7-6, 3.17) allowed three runs and five hits in seven innings, striking out nine.

“I wish you could predict baseball. You just can’t,” Girardi said of his team’s record against the Indians. “It’s hard to figure out because this is a very good team. I can’t figure it out.”