KANSAS CITY, Mo. - This city, starved of postseason baseball for 29 years and long ready to explode, finally did.

It started Monday night when Chiefs fans, more than a few wearing Royals blue, screamed themselves hoarse at neighboring Arrowhead Stadium, setting a Guinness Book crowd decibel record of 142.2 during a 41-14 beatdown of the Patriots.

The blue towel-twirling gathering of 40,502 at Kauffman Stadium didn't generate that kind of sound Tuesday night but it sure didn't sound far off.

Certainly not when Salvador Perez ripped a 2-and-2 pitch down the leftfield line with two outs in the bottom of the 12th inning for an RBI single that gave the Royals a 9-8 victory over the A's, capping an almost indescribable night of baseball.

The hit sent the Royals, playing in their first postseason game since 1985, when they won the World Series, to the American League Division Series against the top-seeded Angels.

After the A's scratched out a run in the top of the 12th against rookie lefthander Brandon Finnegan, Dan Otero and the A's bullpen couldn't finish it in the bottom half. Otero retired Lorenzo Cain but Eric Hosmer hit an opposite-field triple off the top of the wall in left-center, then came in when Christian Colon hit a high chopper to third that resulted in an infield single, tying it at 8.

Fernando Abad got Alex Gordon to pop out and righty Jason Hammel came in to face Perez. After Colon stole second, Perez ended the wild night with his shot past a diving Josh Donaldson at third.

The Royals made three stunning rallies; first from an early 2-0 deficit, later from a 7-3 one, and finally from the 8-7 one in the 12th.

They forced extra innings by scoring one run in the ninth against A's closer Sean Doolittle, which followed an eighth-inning rally against Jon Lester, acquired by the A's at the trade deadline for just these kinds of games.

Lester, brilliant for the fading A's in the second half, was not that sharp Tuesday night, allowing six runs and eight hits in 71/3 innings.

The Royals entered the eighth trailing 7-3 but rallied, getting RBI singles from Cain and Billy Butler, and also scoring a run on a wild pitch by Luke Gregerson, who replaced Lester and allowed two inherited runners to score. The slider specialist, with the potential tying run at third and one out, did recover, striking out Perez and Omar Infante to end the inning, keeping the A's lead at 7-6.

But Doolittle, who posted a 2.73 ERA in recording 22 saves, could not hold it in the ninth. Pinch hitter Josh Willingham dumped a single to right and Alcides Escobar moved pinch runner Jarrod Dyson to second with a bunt. With Nori Aoki at the plate, the speedy Dyson stole third, just beating the throw of catcher Derek Norris. Aoki's sacrifice fly to right brought in Dyson to tie it and send the crowd into a frenzy again.

The stunning victory saved Royals manager Ned Yost from being chased around nearby Country Club Plaza by torch-and-pitchfork wielding fans because of a head-scratching move in the sixth inning that backfired.

The Royals entered the inning with a 3-2 lead and James Shields on the mound.

The righthander had mostly cruised since allowing a first-inning two-run homer to Brandon Moss that gave the A's a 2-0 lead. But Sam Fuld reached on a single to start the sixth and Shield then walked Donaldson.

With Moss up next, Yost had options, none of which included having Shields face the A's designated hitter a second time. He could have gone with Kelvin Herrara, the hard-throwing righthander who formed the front end of perhaps the best seventh-eighth-ninth-inning combos in the sport, along with Wade Davis and closer Greg Holland, posting a 1.41 ERA and striking out 59 in 70 appearances.

With two lefty hitters due up -- Moss and Josh Reddick -- he also could have gone with rookie lefthander Brandon Finnegan (a 1.29 ERA in seven games) or lefthanded starter Danny Duffy, who went 9-12 but with a 2.53 ERA.

Instead, Yost gambled on Yordano Ventura, a rookie who had an outstanding season, 14-10 with a 3.20 ERA, but with just one career relief appearance.

The crowd seemed restless as Ventura came to the mound, and even more so when he fell behind Moss 2-and-0.

One pitch later, Moss launched a 98-mph belt-high fastball to dead center for a crowd-deflating three-run homer that gave the A's a 5-3 lead. The A's added two runs in the inning in which they sent 10 to the plate.

But in a season of defying expectations, the Royals did so again, and somehow, incredibly, found a way to play into October.