The Tampa Bay Rays caught up with the Boston Red Sox in the race for the American League wild card berth on Monday after beating the New York Yankees 5-2.

Boston (89-71), who held a commanding nine-game advantage over Tampa Bay on September 4, lost 6-3 to the Baltimore Orioles to allow the Rays to catch up with two games left to play.

After falling behind to the Yankees, Tampa Bay rallied in the third inning where B.J. Upton hit a game-tying two-RBI double before the home team took a 3-2 lead.

Kelly Shoppach hit a solo home run in the fourth as the Rays opened up a lead for starting pitcher James Shields (16-12), who went 8 2/3 innings, allowing a run in the first and third, before Kyle Farnsworth came on to get the final out of the game.

In the National League, the Atlanta Braves continued their slide with a 4-2 loss to the Philadelphia Phillies that saw their NL wild card lead trimmed to just a half-game over the St. Louis Cardinals, who are also in action against Houston.