New York Yankees' Clint Frazier is embraced by coaches and...

New York Yankees' Clint Frazier is embraced by coaches and teammates after he scores on his walk-off two-run home run against the Tampa Bay Rays during the eleventh inning of an MLB baseball game at Yankee Stadium on Tuesday, June 1, 2021. Credit: Kathleen Malone-Van Dyke

It was all set up for the Yankees in Tuesday night’s thrilling game against the Rays when Gary Sanchez led off the bottom of the seventh inning of a tied game with a double into the leftfield corner . . .

… Except Sanchez was thrown out at third on a grounder to short for the first out of the inning. Another baffling baserunning blunder by the Yankees in a season chock full of ‘em.

Then it was all set up for the Yankees when Aaron Boone sent up Giancarlo Stanton as a pinch hitter with two on and two outs in the eighth . . .

… Except Stanton grounded into a forceout.

Then it was all set up for the Yankees when Mr. Clutch 2019-’20 DJ LeMahieu was up with two on and two outs in the ninth . . .

… Except LeMahieu lined out to the second baseman.

Then it was all set up for the Yankees in the 10th inning of a still tied game with the extra-inning ghost runner in play and the bases loaded and two outs . . .

… Except Sanchez struck out.

Then it was all set up for the Yankees in the 11th of a still-tied game with Sanchez the ghost runner on third and two outs . . .

. . . Finally, finally, finally. Clint Frazier hit a walk-off two-run homer to give the Yankees a desperately-needed 5-3 victory at Yankee Stadium.

Frazier got the win and the save. In the eighth inning of a 3-3 game, Frazier made the defensive play of the night when he raced in and did his now patented full-body dive to catch a pop-up in rightfield hit by Joey Wendle to end the inning with two runners on base. If that ball had dropped, one or two runs would have scored to give the Rays the lead and there likely would have been no extra innings, no ghost runners and no walk-off heroics.

There were so many big plays in this one. The game meant so much more to the Yankees, who had lost four in a row and six of seven, than it did for the Rays, who had won five in a row and 16 of 17 and were 9-1 in their last 10 games at Yankee Stadium.

"We needed that," Boone said.

Who’d a thunk it? The penny-pinching Rays are now the big brothers in this rivalry. The Yankees, who print money during normal times, are looking up at the Rays, hoping to figure out Tampa Bay’s recipe for winning games without throwing around the cash.

The Yankees did so many things well on Tuesday. After Domingo German allowed three runs in five innings, six relievers threw six innings of shutout ball, with Lucas Luetge and Luis Cessa dodging the ghost runners in the 10th and 11th, respectively.

Then there was the defense. Gio Urshela, starting at shortstop to give Gleyber Torres a night off, made two (dare we say) Jeteresque plays in the hole to rob Randy Arozarena of hits in the first and sixth.

Sanchez blocked a ball and picked off Austin Meadows at first base in the sixth to help thwart a Rays rally.

There was bad stuff, too. Sanchez’s inexplicable decision to take off for third on Miguel Andujar’s grounder to short in the seventh tops the list. Sanchez made the Yankees’ 27th out on the bases in 2021. The MLB average is 15 per team.

There was the Yankees’ continued struggles with runners in scoring position: 1-for-10 until Frazier ended things and stood at the plate and watched as the ball disappeared into the night.

It was all set up for the Yankees . . .

. . . and they finally came through.

"An important day today to pull that one out," Boone said. "And a great AB by [Frazier] to finish it off."

Finally, finally, finally.