Carlos Rodon #55 of the New York Yankees is checked...

Carlos Rodon #55 of the New York Yankees is checked out on the mound during the third inning against the Houston Astros at Yankee Stadium on Sunday, Aug. 6, 2023. Credit: Jim McIsaac

The Yankees lost Carlos Rodon to a left hamstring injury in the third inning of Sunday’s game against the Astros.

But given that Rodon already had given up two home runs and five runs, he might not have lasted much longer anyway.

As Rodon was getting checked out, the Yankees rallied from a four-run deficit in the fourth and tied the score with a rally that included four walks (two with the bases loaded) and a bases-loaded hit by pitch.

It was a brand-new ballgame.

Unfortunately for the Yankees, No. 8 hitter Jake Meyers broke the tie with a three-run home run off Wandy Peralta in the sixth — Meyers’ second three-run home run of the afternoon — and the Astros went on to a 9-7 victory before a sellout crowd of 46,345 at Yankee Stadium.

Martin Maldonado followed Meyers’ go-ahead homer with a solo shot as the Astros earned a split of the four-game series. With 50 games left, the Yankees fell to 4½ games behind Toronto for the final AL wild-card berth.

“It’s an amount of games that we’ve got to make up, so it’s definitely on your mind,” Peralta (3-2) said through an interpreter.

“Every time we go out there, you’ve got to go out and compete with your head up and a positive mind. For sure, we’ve got to make up that ground there. But it’s a matter of just going out with a positive thought.”

Harrison Bader had a surprisingly positive thought, saying the Yankees’ comeback attempt “was actually a really big momentum boost for us.”

Rodon had allowed five runs in 2 2⁄3 innings and the Yankees were trailing 5-1 when he said he felt a cramp in his left hamstring on a pitch to Chas McCormick. Rodon threw another pitch and then manager Aaron Boone and the trainer went out to the mound.

After a lengthy discussion, and Rodon throwing two warmup pitches, the lefthander walked off the mound to boos. He was replaced by Jhony Brito.

Rodon will have an MRI on Monday. Of a return to the injured list, he said: “That’s not what I’m thinking. Obviously, it’s important what the imaging shows tomorrow. Not sure. But at this moment I feel pretty confident.”

Rodon had allowed a three-run home run by Meyers in the second inning after walking two batters and a two-run homer by Yordan Alvarez on an 0-and-2 pitch in the third.

Rodon has given up eight home runs in 27 innings after allowing 12 in 178 for San Francisco in 2022.

“I would like that to stop, that’s for sure,” he said. “That’s a fact.”

Rodon, who allowed three hits, walked two and struck out five, left with a 7.33 ERA in six starts since his first season in pinstripes began on July 7. Rodon missed the first three months of the season with forearm and back injuries.

The Yankees signed Rodon to a six-year, $162 million free agent contract in part because of his excellence against Houston. In seven previous outings against the Astros, Rodon was 2-0 with a 1.55 ERA.

The Yankees tied it in the fourth after loading the bases on a single and two walks against Jose Urquidy, who was making his first start since April 30 after a shoulder injury.

Bader (3-for-5, two RBIs) lined an RBI single to left to make it 5-2. Phil Maton then allowed three runs to score in a four-batter span, all on 3-and-2 pitches that were out of the strike zone. First he hit Anthony Volpe. Then, after a strikeout of Kyle Higashioka for the second out, Maton walked Jake Bauers and Aaron Judge to tie the score at 5.

Gleyber Torres (3-for-4, double, home run, two walks, two RBIs) hit his 18th home run in the first for the game’s first run. Torres also doubled home a run in the sixth to make it 9-6.

Bader’s bases-loaded single with two outs in the eighth made it 9-7. Volpe followed with a drive to center that was caught by Meyers.

The Yankees outhit Houston 8-6 and struck out 14 Astros, bringing their two-day total to 30. They also drew 12 walks (including one by Torres on a pitch-clock violation with two outs in the ninth) but left 15 runners on base, including 14 in the last six innings. Giancarlo Stanton (0-for-6) hit a fly ball to the warning track in center with two men on to end it.

“We needed to get a big hit today,” Boone said. “You’ll take seven runs and try and make that stand up. We’re probably one big swing away from a double-digit day. I thought Giancarlo had a great at-bat there to finish things off. Almost clipped him.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME