BATMAN: Alfonso Soriano, who went 2-for-5, doubles to left field during the 11th inning of the Yankees’ 3-2, 11-inning victory over the Rays yesterday. After the double, Soriano stole third base and scored the game-winning run on a Curtis Granderson sacrifice fly. Photo: Getty Images

ST. PETERSBURG, Fla. — The Yankees traded for Alfonso Soriano for his power, not his speed.

At 37, he’s no longer the base-stealer he once was.

But trying to avoid a three-game sweep at the hands of the Rays, manager Joe Girardi was prepared to take a risk in the 11th inning, so he gave Soriano the green light to swipe third.

The move paid off, as Soriano just beat Jose Lobaton’s throw to third and he was able to score on Curtis Granderson’s sacrifice fly in the Yankees 3-2 win at Tropicana Field to close back to within 3 1/2 games out of the second wild-card spot.

“I turned him loose,” Girardi said.

Expect to see more play like that out of the Yankees, who open a series in Toronto tonight, hoping to take advantage of the dreadful Blue Jays once again.

“We’re in tight games and you’re gonna have to do some things,” Girardi said. “And it worked out.”

Mariano Rivera, facing the heart of the Rays’ lineup, picked up his 38th save and wasn’t interested in talking about avoiding sweeps.

“We have to win,” Rivera said. “That’s it. From now on that’s it. We can’t think about anything else.”

“We were shifted all the way to the other side, so honestly, I wasn’t paying much attention to Soriano at second,” second baseman Ben Zobrist said. “He produced that run himself, hitting the double and then picking the right pitch.”

After Nova gave up a run in the first, Robinson Cano tied the game in the fourth with an opposite-field homer. Granderson and Eduardo Nunez followed with two out singles before Zobrist robbed Lyle Overbay of a hit — and the Yankees of a run — with a diving play to end the inning.

In the sixth, after an infield hit by Ichiro Suzuki to lead off, Cano doubled him in, but inexplicably tried to get to third and was thrown out and the Yankees were unable to add to their lead.

Evan Longoria tied the game at 2-2 with a home run in the bottom of the inning.

But those details weren’t as important to Girardi after the Yankees escaped Tropicana Field with a victory.

“Each day that ticks off, we’ve got to make up more ground,” Girardi said. “This is obviously one of the teams that we’re chasing. It’s been a tough place for us to win. People wrote us off a few times, but they find a way to bounce back.”