It took 12 innings, but the Kansas City Royals won the American League wild-card game over the Oakland Athletics 9-8 on Tuesday night. They now move on to the American League Division Series.

In the bottom of the 12th, Christian Colon and Salvador Perez hit RBI singles. The A's were up 8-7 until Eric Hosmer tripled and scored on Colon's hit down the third-base line.

"This will go down as the craziest game I've ever played," Hosmer said, according to The Associated Press. "This team showed a lot of character. No one believed in us before the game. No one believed in us before the season."

In the game that lasted nearly five hours, the Royals rallied from deficits of 7-3 and 8-7.

Didn't stay up late to watch the game? The Kansas City Star has a photo gallerythat can get you up to speed.

It was the Royals' first appearance in a postseason game in 29 years.

In 1985, they beat St. Louis in the World Series.

The Royals next play the Los Angeles Angels on Thursday in Anaheim, Calif.

Copyright 2016 NPR. To see more, visit