Time after time Wednesday night, the Yankees avoided defeat.

A blown save by Devin Williams. A base-running blunder by Austin Wells. Deficits in the eighth, ninth and 10th innings.

The Yankees overcame them all in a 5-4 win over the Tampa Bay Rays, with recent acquisition Ryan McMahon delivering a walk-off single in the 11th to cap a roller-coaster game in the Bronx on the eve of the MLB trade deadline.

“It just feels good to come through for the team,” McMahon said. “Every win matters right now in this chase.”

The final four innings featured three ties and four lead changes, the last of which occurred after McMahon stepped to the plate with two runners on and no outs.

McMahon was prepared to bunt, but a balk by Kevin Kelly moved automatic runner Jazz Chisholm Jr. to third. The lefty-swinging McMahon then sent a deep fly ball into center field for the game-winner.

Acquired last week in a trade with the Colorado Rockies, McMahon is 6-for-17 (.353) with four RBI in five games with the Yankees.

“It feels good,” the third baseman said. “It makes it a little bit easier to feel like you’re really part of a team and everything like that, but hey, man, this is an extremely humbling game, so just trying to take it day by day.”

McMahon’s 382-foot single was one of several clutch hits by the Yankees, who trailed, 1-0, going into the bottom of the eighth.

Trent Grisham led off the eighth with a game-tying home run — his 18th homer of the season, which set a career high.

That was the first of four consecutive hits against reliever Bryan Baker by the Yankees, who took a 2-1 lead on Giancarlo Stanton’s RBI single.

That remained the score in the top of the ninth, until Williams surrendered a two-run home run to Josh Lowe that put Tampa Bay up, 3-2. It was the second blown save of the season for Williams, who had converted 13 consecutive opportunities since April 25.

Anthony Volpe re-tied the game, 3-3, in the bottom of the ninth with a one-out solo home run against Pete Fairbanks, and Wells followed with a soft single.

But confusion extinguished another scoring opportunity.

After Grisham was retired on a bunt attempt for the second out, Wells began jogging away from second base as if the inning were over.

Wells was quickly caught in a 5-3-6-3 rundown, sending the game into extra innings.

“Just thought there was three outs,” Wells said, adding, “Very embarrassed and disappointed, for sure. You let the guys down when you do that.”

But the Yankees picked Wells up, starting in the 10th when left fielder Jasson Domínguez’s leaping catch at the wall limited Jonathan Aranda to a one-out sacrifice fly with the bases loaded.

“We practice all those plays,” Domínguez said. “We practice that almost every week, and you just get used to it with the reps. When I get close to the wall, I feel like I’ve done it before.”

The score remained 4-3 in the bottom of the 10th until Cody Bellinger lined a game-tying triple against Edwin Uceta.

That was part of a 2-for-5 game by Bellinger, who a night earlier drilled a game-tying three-run homer in Tuesday’s win over Tampa.

“We talk about, obviously, [Aaron Judge] being MVP, and rightfully so, but we’re gonna get to the end of the year and Cody Bellinger’s gonna be on that list,” manager Aaron Boone said. “I don’t know where he’s gonna fall, but he’s played that well.”

Boone had hoped to give reliever Tim Hill a night off on Wednesday, but he turned to him for the 11th out of necessity, and the left-hander hurled a scoreless frame.

That set up McMahon’s walk-off heroics in the bottom of the inning.

“This team does a great job of playing,” Boone said. “Just keep playing, and we talk about that a lot. You’ve got to be able to withstand a mistake, because the next play is just too important.”

All of that followed a strong start by rookie right-hander Will Warren, who limited the Rays to one run over six innings. Warren worked around six hits and a walk while striking out four and matched his career high with 102 pitches.

“I forgot I pitched in the game, actually,” Warren joked. “It was a long one, but that was awesome. It had that playoff feel. The steady fight. They throw one punch, we throw one back.”

With the win, the second-place Yankees (59-49) remained four games behind the division-leading Toronto Blue Jays in the American League East and a game ahead of the Boston Red Sox for the AL’s top wild card spot.

The Yankees have been active in the last week, adding McMahon and righty-swinging bench pieces Amed Rosario and Austin Slater in trades.

Earlier this month, general manager Brian Cashman cited a desire to add a starter and “some relievers” to a pitching staff that lost ace Gerrit Cole and Clarke Schmidt to season-ending elbow surgeries and that has endured its share of bullpen injuries as well.

The Yankees have one more game before Thursday’s 6 p.m. deadline. Marcus Stroman (2-2, 6.09 ERA) is set to start Thursday afternoon’s series finale, while Ryan Pepiot (6-8, 3.42 ERA) is scheduled to pitch for Tampa Bay.

Originally Published: July 30, 2025 at 10:37 PM EDT