The Orioles had the bases loaded with no outs and were trailing by two runs in the seventh inning Tuesday when Tampa Bay Rays manager Joe Maddon called for Alex Torres the left-hander who seems suited for those situations.

Remember the time in early June when Torres came on at Detroit with the bases loaded and no outs and the meat of the Tigers order up? Three batters three outs.

Remember the time a few weeks later in New York when Torres came on with the bases-loaded and one out? Two batters two outs.

“Don't think I did not think about that” Maddon said Tuesday night.

And Torres did it again trading a run for a double play grounder before ending the inning with a strikeout.

The Rays survived the inning with the lead and went on to beat the Orioles 7-4 at Camden Yards.

The win allowed Tampa Bay which trailed the Boston Red Sox by 4 games in the American League East standings just last week to move back into a tie for first place after the Red Sox lost in San Francisco later Tuesday night.

The Rays who at 72-52 have two fewer losses than 74-54 Boston are tied with the Detroit Tigers (73-52) for the least defeats in the AL.

Tuesday's game was a perfect example of how they've gotten there.

Matt Joyce delivered a two-run double in the ninth inning and Wil Myers added a two-run single for what proved to be a pair of big insurance runs for the Rays who have won six of their last seven games after a humbling 0-5 road trip.

Joyce moved to the cleanup spot for the game because of his ability to draw walks and because he has been hitting well of late scored the Rays' first run of the game in the second inning and delivered a sacrifice fly in the third inning that gave them a 3-1 lead.

Alex Cobb making his second start since missing two months with a concussion took a two-hitter into the seventh inning before running out of gas. Until then he kept the potent Orioles offense in check with what Maddon called an “elite curveball.”

“Premier curveball” Maddon said. “I don't know who throws a better one. I don't know who throws a better curveball than I saw (Tuesday).”