ST. PETERSBURG, Fla. — Just before departing Houston for a series against the last-place Rays, Yankees manager Joe Girardi warned that his pitchers had to focus on keeping the Rays in the park at Tropicana Field because they still hit plenty of home runs. Famous last words.

For the second straight game, the Rays tagged Yankees pitchers for three home runs on their way to a 6-3 victory Saturday night. It was the third straight loss for the Yankees, who will be desperate to avoid being swept Sunday and possibly seeing the team broken up before Monday’s 4 p.m. non-waiver trade deadline.

They are 4 1⁄2 games behind the Red Sox for the second wild card and also trail the Tigers, Astros and Mariners.

“These are frustrating losses,” Girardi said. “We have gotten behind early in games and haven’t been able to catch up. You have to go out and find a way to win.”

Nathan Eovaldi (9-7) gave up only three hits in six innings but allowed two home runs in his seventh multi-homer game, which is tied for the major-league lead. Rays lefthander Drew Smyly (3-11, 5.29), who was winless in his previous 11 starts, allowed four hits in six innings.

advertisement | advertise on newsday

Smyly looked dominant while striking out Alex Rod riguez three times. A-Rod matched a career worst with a fourth strikeout against Alex Colome.

The pregame focus naturally was on Rodriguez, who went from the end of the bench in the previous six games to the cleanup spot. Girardi became testy before the game when a reporter suggested that A-Rod is in a “Catch-22” situation in which he has to be productive to get more opportunities but doesn’t get enough opportunities to produce.

Girardi turned the tables, saying he’s in a no-win situation. “When I don’t play him, I’m questioned; when I play him, I’m questioned,” he said.

Asked after the game if Rod riguez looked rusty, Girardi said, “It’s been a struggle for him, and it was a struggle tonight. I don’t know if it’s rust or what it is.” He was unsure if Rodriguez will be in the lineup Sunday against lefthander Blake Snell.

A-Rod made no excuses about rust but said Smyly has been tough on him and had him off-balance. “I was swinging at balls and looking at strikes,” he said. “I had a chance to make a case for myself tonight, and I didn’t do a good job of that . . . I didn’t do myself any favors tonight for sure. I’ve underachieved this year, but I continue to have faith it will turn around.”

Yankees videos

The Yankees fell behind on a first-inning home run for the fourth time in five games. This time, Eovaldi threw a 99-mph fastball that No. 2 hitter Brad Miller drilled over the centerfield wall. During those five games, they have allowed a homer on their starting pitcher’s first, sixth, third and fifth pitch. It was the fifth first-inning homer the Yankees have given up in the five games.

Chase Headley’s one-out single and Brett Gardner’s two-out home run gave the Yankees a 2-1 lead in the top of the third, but Smyly left with a 3-2 lead after a two-run homer by No. 9 hitter Curt Casali — who entered the game batting .166 — in the bottom of the inning.

Anthony Swarzak let the game get away in the seventh. With one out, Kevin Kiermaier stretched a single to right into a double, stole third and scored on a single by Steven Souza Jr. Tim Beckham followed with a two-run homer to make it 6-2.

Headley homered in the eighth, but Kiermaier then made a leaping catch in center to rob Austin Romine of an extra-base hit.

Girardi said of the Rays’ flurry of homers, “It’s just mistakes. We’re not hitting our spots, and it’s leading to home runs.”

advertisement | advertise on newsday

It might be leading to a selloff.