The New York Yankees became the first team in Major League Baseball to hit the 50-win mark thanks to their latest victory over the Tampa Bay Rays on Monday.

New York got 7 1/3 innings from Gerrit Cole before it was broken up in the eighth inning. Tampa Bay tied the 2-0 game in the same inning thanks to a run-scoring groundout from Yandy Diaz and an infield single from Manuel Margot.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Gerrit Cole against the Rays

New York Yankees starter Gerrit Cole checks a baserunner during the Tampa Bay Rays game, Monday, June 20, 2022, in St. Petersburg, Florida. (AP Photo/Steve Nesius)

But clutch hitting lifted New York in the ninth.

Aaron Hicks tripled to score Josh Donaldson and then a Jose Trevino sac-fly scored Hicks. The Yankees sealed the victory in the bottom of the inning. Cole ended up with the no-decision while Wandy Peralta was given the win for one inning of work, a strikeout and a loss.

"For us to answer back like that just shows what this team’s about," Yankees slugger Aaron Judge said. "We don’t just live or die by the long ball. We’re just a good all-around team."

MLB DEBUTS 'ROBOT UMPIRES' FOR SOME TRIPLE-A GAMES AS EMERGENCE IN THE MAJORS LOOMS

Gerrit Cole pitches against the Rays

New York Yankees starter Gerrit Cole pitches during the first inning against the Rays Monday, June 20, 2022, in St. Petersburg. (AP Photo/Steve Nesius)

Judge went 0-for-3 with a walk but has been on a torrid home-run pace. He has 25 home runs and is hitting .301 with a 1.026 OPS.

New York moved to 50-17 with the victory.

Cole finished with 12 strikeouts and was hit with an earned run.

"He was just cruising. I guess it was just a normal Cole day," Judge added. "He had all his pitches working tonight. Just to be able to use all those pitches in any count, in any situation, is pretty impressive."

New York manager Aaron Boone lauded the comeback victory.

Aaron Judge and the Yankees win

Aaron Judge of the New York Yankees high-fives teammates after beating the Tampa Bay Rays 4-2 at Tropicana Field on June 20, 2022, in St Petersburg. (Tyler Schank/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

"Any time you get to the eighth inning, you’re starting to smell it and it gets close. But once (the no-hitter) goes by the wayside and it’s tie game, it's right back to: ‘Let’s go find a way to get this thing done,’" Boone said. "Just a good resilient victory and a lot of good things that helped us get there."

The Associated Press contributed to this report.