By Julian Linden

(Reuters) - The Tampa Bay Rays and St Louis Cardinals snatched the last two places in the Major League Baseball (MLB) playoffs on Wednesday after one of the most dramatic endings to the regular season the sport has witnessed.

The Rays clawed their way back from the brink of defeat to beat the New York Yankees 8-7 in 12 innings to claim the American League wild card while the Cardinals thumped the Houston Astros 8-0 to grab the National League berth.

While the Rays and Cardinals were celebrating as though they had won the World Series, there was only heartbreak for the Boston Red Sox and Atlanta Braves, who looked to have the two slots sewn up before late season slumps.

Both teams could have still forced a sudden-death playoff on Thursday if they had won but both suffered agonizing losses in one of the most nerve-jangling final days of the regular season in years.

The Red Sox gave up two runs in the bottom of the ninth to lose 4-3 to the Baltimore Orioles to finish one win behind the Rays in the American League while the Braves lost to the Philadelphia Phillies by the same score in a 13-inning nailbiter.

With the eight playoff teams now decided, the best-of-five divisional playoffs will begin on Friday with the Yankees hosting the Detroit Tigers and Tampa Bay away to the Texas Rangers in the American League. On Saturday, the Phillies will host the Cardinals while the Milwaukee Brewers will entertain the Arizona Diamondbacks.


Destiny was still in their own hands when they led the Orioles 3-2 at the bottom of the ninth with two outs before Robert Andino drove in the winning run after closer Jonathan Papelbon struck out the first two batters. "That's beyond fiction," Rays manager Joe Madden said in a televised interview. "No-one would believe any of that." The Braves led the Cardinals by 8 games at the start of the month but like the Red Sox, they threw it all away when victory was within sight, giving up the tying run in the ninth.

"The fact that we're going home now won't sit well with any of us," second baseman Dan Uggla said. "It's going to take a while for us to get over this." While the battles for the wild cards stole the spotlight, Texas and Milwaukee both won their games to finish second in the league standings and ensure home advantage for the divisional playoffs. Mike Napoli homered twice as the Rangers beat the Los Angeles Angels 3-1, while Brewers pitcher Zach Greinke gave up two runs over six innings in a 7-3 win over the Pittsburgh Pirates.

(Editing by John O'Brien; To query or comment on this story email sportsfeedback@thomsonreuters.com)