The fate of four teams vying for only two playoff spots came down to the wee hours of Thursday morning, and when all was said and done, the two clubs who spent most of September making a strong push to the stop of the standings ended up making the postseason.
Thanks to extra-inning wins by the Tampa Bay Rays and the Baltimore Orioles, the Rays grabbed the American League wild card after trailing the Boston Red Sox by nine games in early September.
In the National League, the St. Louis Cardinals routed Houston and the Atlanta Braves lost in extras to Philadelphia, sending the Cards to the postseason as well.
The Rays clinched the AL wild card with a stunning rally Wednesday night, overcoming a late seven-run deficit and then beating the New York Yankees 8-7 on Evan Longoria's home run in the 12th inning.
The Rays' win came four minutes after Boston blew a one-run lead in the ninth at Baltimore and lost 4-3. The Red Sox, who held a nine-game lead over the Rays in early September, and Tampa Bay began the final day of the regular season tied for the wild card.
Longoria hit a three-run homer in the eighth that capped a six-run burst. Pinch-hitter Dan Johnson's two-out, two-strike solo homer in the ninth tied it for Tampa Bay.
Longoria won it with a one-out shot barely inside the left-field foul pole.
Tampa Bay will open the playoffs Friday at Texas.
Red Sox completed their September collapse in horrific and historic fashion, falling out of the playoff chase by allowing two ninth-inning runs in a 4-3 loss to the Baltimore Orioles on Wednesday night.
The Red Sox held a nine-game lead in the AL wild-card race after Sept. 3, but a 7-19 swoon left them tied with Tampa Bay entering the final day of the regular season.
Only minutes after this game ended, the Rays completed their comeback from a 7-0 deficit with an 8-7 win over the New York Yankees in 12 innings.
Even if Tampa Bay lost, the Red Sox faced the prospect of a quick turnaround following a long night at Camden Yards that included a rain delay of 1 hour, 26 minutes in the middle of the seventh inning.
Meanwhile, Chris Carpenter and the Cardinals completed one of the more remarkable comebacks in baseball history, clinching the NL wild card Wednesday night with an 8-0 win over Houston and a later loss by Atlanta.
Carpenter (11-9) struck out 11 and allowed two hits in his 15th career complete-game shutout as St. Louis kept up its improbable September charge. The Cardinals won for the 23rd time in 31 games, having trailed Atlanta by 10 1/2 games on Aug. 25.
The Cardinals poured onto the field after Carpenter fielded J.D. Martinez's weak grounder for the final out.
In Atlanta, with the season on the line, the Atlanta Braves couldn't get the final three outs.
Now, they'll have the whole winter to ponder an unprecedented collapse.
Braves closer Craig Kimbrel surrendered the tying run in the ninth, and Hunter Pence came through with a two-out, run-scoring single in the 13th to give the Philadelphia Phillies a 4-3 victory that ended the Braves season Wednesday night without a trip to the playoffs that looked like a certainty just a few weeks ago.