The Chicago White Sox committed four errors and were down three runs with two outs in the ninth, facing one of the hottest teams and one of the best closers in the majors.

So they put five straight men on base and wind up with a 12-inning, 10-7 victory Wednesday over the stunned Kansas City Royals.

"Crazy game. Very crazy game," White Sox manager Ozzie Guillen said. "Both sides. But thank God we win."

Carlos Quentin had four hits, including a solo home run in the eighth and a two-run double in the ninth that capped a four-run uprising against Joakim Soria.

A two-time All-Star, Soria had never allowed four runs in a game in his five-year career, let alone four with two out in the ninth.

"I never thought this was going to happen ever, Soria give up that many runs with two out," Guillen said.

Neither did Ned Yost.

"Taking a three-run lead into the ninth, you feel pretty good every time Soria comes into the game," said the Royals manager. "He got two quick outs and then they just kept finding holes. They didn't really smash the ball. They just kept finding holes."

In the 12th, Brent Morel hit a two-run single off Sean O'Sullivan (0-1) for the go-ahead runs as the White Sox broke the Royals' four-game winning streak.

The energetic Royals were in position to improve to 5-1 after Soria retired the first two batters on easy grounders. But Alex Rios and Paul Konerko hit RBI singles and Quentin's two-run double capped a four-run comeback for a 7-6 lead that held up until Kila Ka'aihue's RBI double off Matt Thornton tied it 7-all and set up the Royals' third straight extra-inning game.

Quentin said the White Sox were fully aware of who they were facing in their improbable ninth-inning rally.

"You've got to look at it as the beauty of baseball," Quentin said. "Sometimes that happens. Guys will lock in. Pitches are made and swings are put on pitches that are proper swings. We're well aware of what Soria has done in his career. He's a quality pitcher and today we were fortunate enough to come back."

Soria may have been tired.

"In his defense and he'll never admit it, he's worked five of six days," said Yost.

Quentin doubled to start the 12th. After a bunt single and an intentional walk, Morel hit a two-run single and Juan Pierre added a sacrifice fly.

Winner Chris Sale (1-0) went two innings, giving up one hit and striking out two.

The Royals had won their previous four games all in their final at-bat, and had their chances in this one, too. Kansas City had runners at first and second with one out in the ninth and didn't score, and put runners at the corners with one out in the 11th without getting a run.

Royals starter Jeff Francis had a six-hit shutout going until Ramon Castro homered on a 3-1 pitch with two outs in the seventh. Francis was lifted after Morel singled, and Pierre hit an RBI triple off rookie reliever Tim Collins.

White Sox starter Mark Buehrle went five innings and gave up five runs. He allowed eight hits and had two strikeouts.

Alex Gordon had an RBI double in the first inning and scored on Billy Butler's single for a 2-0 lead off Buehrle. Elcides Escobar's RBI double made it 3-0 in the fourth and was followed by Brayan Pena's RBI single and an RBI ground out by Mike Aviles.

Quentin homered off Robinson Tejada in the eighth.

With two outs in the Kansas City eighth, Chris Getz scored from first when left fielder Mark Teahen dropped Mike Aviles' fly ball for the third Chicago error.

The White Sox stranded runners at first and third in both the fourth and fifth innings.

NOTES: Chicago DH Adam Dunn underwent an emergency appendectomy Tuesday night and will be out about 5 days. ... Teahen, formerly of the Royals, pinch hit in the eighth for Chicago and got a nice hand from the crowd. He flied out. ... It was the fifth four-hit game for Quentin and his first since Aug. 5, 2008 against Detroit.