New York Yankees Aaron Judge heads out into the field...

New York Yankees Aaron Judge heads out into the field after striking out against the Tampa Bay Rays during the fifth inning of a baseball game Sunday July 7, 2019, in St. Petersburg, Fla.  Credit: AP/Scott Audette

ST. PETERSBURG, Fla. — A Yankees offense that has been among the best in the American League hit the skids in the last two games of the first half.

Sunday’s 2-1 loss to the Rays at Tropicana Field, the Yankees’ second straight one-run defeat, made it a slightly bitter end to an otherwise superb first half that has them in solid position to win the AL East title for the first time since 2012.

“We’re in a good spot, being in first place,” Aaron Judge said. “That’s our goal, win the division first off. So first place at the break, that’s a start. Rest up [at the break] and get ready for a big second half.”

The Yankees (57-31) still have won 16 of their last 20 entering the All-Star break and have a 6½-game lead over the second-place Rays (52-39). They have gone 29-9 against AL East teams, including 9-4 against Tampa Bay. All of that was accomplished despite a cascade of injuries that sent 21 players to the injured list in the first half.

“As I just told the guys, they’ve put us in a great spot,” Aaron Boone said. “But that’s all it is right now. We have some unfinished business now, but we put ourselves in position to have a really special season.”

The offense, which went 1-for-12 with runners in scoring position in Saturday’s loss, didn’t have anything close to that many chances Sunday against Charlie Morton and four relievers, and it led to a tough loss for James Paxton.

After allowing two runs and three hits in the first inning, the lefthander was dominant, striking out 11 and walking none in six innings. He allowed only four hits after the first.

“Rough first inning. After that, I settled in,” said Paxton (5-4, 4.01). “Probably the best stuff I’ve had in the last little bit, so that was encouraging going into the second half.”

But a lineup that was without DJ LeMahieu and Gleyber Torres — Boone chose to rest them in part because of their upcoming travel to Cleveland for the All-Star Game — had only five hits and a walk, struck out 14 times, went 0-for-4 with RISP and stranded five.

Morton (10-2, 2.32) allowed one run, five hits and a walk in 5 2⁄3 innings, striking out 10. The lone run came on Brett Gardner’s 15th homer, a second-inning drive that made it 2-1.

While there was plenty of social media howling over the lineup, the day’s biggest misfire by the group came from the top of the order.

Breyvic Valera, a waiver claim in May who was called up earlier in the day and started at second base, led off the third with a single and went to third when Austin Romine banged one back up the middle for a hit-and-run single. Aaron Hicks, on fire of late, struck out for the first out, setting up the key at-bat of the day.

After falling behind 0-and-2 and then laying off three sharp curveballs, Judge took a full-count fastball that was down the middle but shin-high for strike three. That prompted some prolonged chirping from the Yankees’ dugout and a brief discussion between Judge and plate umpire Vic Carapazza, a rarity for the rightfielder. Didi Gregorius flied out to end the inning.

“Big play in that game,” Boone said, clearly still irritated.

The Yankees put only one more runner in scoring position as Gardner doubled with two outs in the fourth.

The 6-7 Judge, who has had an inordinate number of low pitches called strikes, didn’t make a huge issue of it.

“I just talked to Vic and let him know I thought it was down, and then you just move on,” he said. “If you spend a lot of time worrying about balls and strikes and this and that, you’re not going to do so well the rest of the game.”

More Yankees headlines

Newsday LogoCovering LI news as it happensDigital AccessOnly 25¢for 5 months