NEW YORK (

TheStreet

) -- The Tampa Bay Rays won the AL wild-card race Wednesday night while the Red Sox were sent home after going 7-20 in September.

The Rays, down by seven runs at one point during the game, beat the Yankees 8-7 in 12 innings on an Evan Longoria solo home run. The Red Sox were close to beating the Orioles but Jonathan Papelbon gave up a pair of two-out runs in the ninth inning. The 4-3 loss eliminated the Red Sox from the playoffs.

The Rays and Red Sox entered play on Wednesday tied for the AL wild-card race.

The Rays will face the Texas Rangers in the first round of the playoffs on Friday. The Yankees will play the same day against the Detroit Tigers.

In the National League, the St. Louis Cardinals won the NL wild-card race over the Atlanta Braves.

The Cardinals open up the playoffs against the Philadelphia Phillies. The Milwaukee Brewers, the NL Central champion, play the Arizona Diamondbacks in the first round.

-- Written by Joseph Woelfel

>To contact the writer of this article, click here:

Joseph Woelfel

>To submit a news tip, send an email to:

tips@thestreet.com

.