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 on Sunday and possibly seeing the team broken up at Monday’s 4 p.m. non-waiver trade deadline.

Starter Nathan Eovaldi (9-7), who gave up only three hits but allowed two home runs in six innings, took the loss. Rays starter Drew Smyly (3-11), who allowed four hits in six innings and recorded six strikeouts, was winless in his previous 11 starts.

The pregame focus naturally was on Alex Rodriguez, who went from the end of the bench in the previous six games to the cleanup spot against Rays lefthander Smyly — and struck out in each of his four at-bats. “He’s one of the guys that has had decent success off lefthanders for us this year,” Girardi said. “Some of the other guys hitting below him, it’s been a struggle at times. We don’t have a whole lot of good numbers off the pitcher tonight, so I thought I’d stick Alex in.”

When one reporter suggested that Rodriguez was 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 with the media. “When I don’t play him, I’m questioned; when I play him, I’m questioned,” he said. “So anyone who wants to do it can do it next time.”

Of course, Girardi has been through similar situations in recent years. The Yankees phased out Jorge Posada and Derek Jeter struggled in his final season, when some wanted to see him demoted in the batting order. “Yeah, it’s something we’ve had to deal with here — aging superstars,” Girardi said. “We’ve had to deal with that, and I’ve gotten kind of used to it now.”

The problem for Girardi is that, if he’s not going to play Rod riguez when the Yankees aren’t hitting or scoring many runs, it’s like giving up a roster spot. Even he had to admit the logic of that. “Yeah, I guess you’re a little bit short,” Girardi said, “but this is not a lineup where we pinch hit a lot.”

Despite hitting a ninth-inning single in a pinch-hitting role Friday night, Rodriguez looked rusty while striking out in his first three at-bats against Smyly before whiffing a fourth time against closer Alex Colome. But the Yankees ran into bigger problems than that. They 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. That actually was the fifth first-inning home run Yankees pitchers have given up in five games, including two by Ivan Nova in Friday night’s loss to the Rays.

The Yankees responded in the top of the third inning when Chase Headley drilled a one-out single and Brett Gardner’s two-out home run to rightfield gave them a 2-1 lead. But that was all the damage they could manage against Smyly. He left with a 3-2 lead thanks to a two-run homer by No. 9 hitter Curt Casali — who entered the game batting .166 — in the bottom of the third.

Eovaldi gave way after six innings to Anthony Swarzak, who let the game get away. 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 right-center to push the Rays’ lead to 6-2.

Headley got a run back with a solo homer leading off the eighth, but Kiermaier then made a leaping catch in center to rob Austin Romine of an extra-base hit.