OAKLAND -- Baseball's most improbable story of 2012 is complete: The Oakland Athletics are champions of the American League West.
Written off by the experts following an offseason in which young stars were again traded, the A's faced a 13-game deficit as late as June 30 before stealing the division title from Texas, beating the Rangers 12-5 Wednesday.
The A's, who picked up six games in the standings over the final nine days, rallied from an early 5-1 deficit Wednesday. Oakland never held sole possession of first place all season until getting the final out of the season's 162nd game.
Two-time World Series runners-up Texas, meanwhile, led the division for 176 consecutive days until Oakland tied for first Tuesday.
The Rangers will play as a wild-card entrant Friday against either the Baltimore Orioles or New York Yankees.
The Athletics' big fourth-inning rally started when Rangers starter Ryan Dempster issued a walk to Brandon Moss. Three consecutive hits followed to produce two runs -- a double by Josh Reddick along with singles from Josh Donaldson and Seth Smith -- sending the veteran Dempster to the showers.
Reliever Derek Holland retired the first two he faced, but he couldn't work out of the two-out jam as Coco Crisp placed a double in the right-field corner to tie it. Stephen Drew walked before the key play of the inning occurred. Yoenis Cespedes skied a fly to medium center on a 3-1 pitch, a routine play, but the ball tipped off the end of Josh Hamilton's glove for a two-run error, and the Oakland uprising was complete -- six runs on four hits and a 7-5 lead.
The comeback was necessary because Texas quieted the standing-room-only crowd of 36,067 early with a five-run rally in the third inning.
Leadoff hitter Ian Kinsler started the rally with a single to right off A's rookie starter A.J. Griffin. One out later, Kinsler moved to third on Hamilton's single to right. Adrian Beltre hammered a 1-0 pitch through the shortstop hole into left field to tie it.
Following a fielder's choice, Texas' bats continued to add on with four more runs on four hits and the aid of an Oakland error. Michael Young fouled off three 0-2 pitches to place a key run-scoring double on the right field foul line. David Murphy's hump-back liner to right-center scored two.
Mike Napoli's mile-high pop, just in fair territory 20 feet up the third base line, was dropped by Oakland catcher George Kottaras on a ball that would have been an easier play for third baseman Donaldson to attempt.
Texas took advantage of the misplay, as ninth-hitting Geovany Soto snapped an 0-for-16 slump with a groundball single up the middle to score the fifth and final run while chasing Griffin in the process.
Oakland catcher Derek Norris hit an RBI single in the fifth inning to give the A's a three-run advantage. And Norris, who didn't start, hit a leadoff homer on an 0-2 pitch to kick-start a four-run rally in the eighth to put the game out of reach. Moss supplied a two-run single in the inning.
The A's touched Dempster in the first by bunching three straight hits with one out -- a Moss double produced the run after Drew and Cespedes singled.
The Oakland bullpen supplied clutch relief. Evan Scribner tossed three innings of two-hit, shutout ball. Jerry Blevins struck out Hamilton to get the final out of the sixth. Ryan Cook pitched out of a two-on, none-out jam with an infield groundout and a pair of strikeouts in the seventh.
It was Sean Doolittle's turn in the eighth. After he got the first two Rangers, Doolittle flashed a flair for the dramatic by striking out Hamilton after teasing Texas with a walk issued to Andrus. Grant Balfour, pitching for the fifth day in a row, threw a 1-2-3 ninth to close out the regular season.
NOTES: Oakland went into Wednesday's game batting .238, second lowest in the league and the lowest average for a postseason team since the 1972 Detroit Tigers (.240). ... The game marked only the third time since divisional play began in 1969 that two teams played head-to-head to decide a division title. ... Griffin's start marked the 101st made by an A's rookie pitcher this season. ... When asked about his recent sleep patterns beforehand, Oakland manager Bob Melvin said, "I'll sleep in the offseason, let's put it that way."