Updated

The Kansas City Royals had mounted charge after charge, burned through everybody in their bullpen and even called on some help from Everett Teaford, who was scheduled to start for them early next week.

They kept hanging on by a thread until Chicago's Kevin Youkilis finally delivered the knockout blow.

The gritty White Sox third baseman hit a sacrifice fly in the 14th inning to finish off a 14-pitch at-bat, and Chicago held on for a 9-8 victory over Kansas City in a game that stretched into the wee hours of Saturday morning.

"The offense did a great job of battling back. We had a couple of situations to put it away, but didn't," Royals manager Ned Yost said.

Gordon Beckham drew a one-out walk off Teaford (1-3) to start the winning rally, and Alejandro De Aza sent a single down the third-base line to put runners on the corners. Youkilis managed to send a ball far enough into center field for his fifth game-winning RBI in 14 games with Chicago.

"At some point you figure he's battling enough that he's going to be able to win that," White Sox manager Robin Ventura said of Youkilis, who came over in a trade with Boston late last month.

"He's the guy you want to have up there in that situation."

Dylan Axelrod (1-2) worked around trouble in the 13th for Chicago, and then retired the side in the 14th to end a game that lasted 5 hours, 23 minutes.

Both teams had chances to end it much earlier. Royals closer Jonathan Broxton blew a save in the ninth inning and White Sox closer Addison Reed did the same in the 12th.

"I walked two dudes on eight pitches," Broxton said long after he had pitched. "You can't do that and expect to have success. I wasn't very good tonight."

Each team burned through nine pitchers, setting a franchise record for the Royals.

"They outlasted us tonight," Teaford said.

The game nearly ended in the 13th inning, when Chicago's Dayan Viciedo drew a walk off Tim Collins, and Beckham doubled to score pinch-runner Jordan Danks from second base.

Jeff Francoeur answered with a double leading off the bottom of the inning, and after Brayan Pena grounded out, Lorenzo Cain singled to put runners on the corners. Alex Gordon sent a chopper up the middle that scored Francoeur and kept the game alive.

Of course, that was a microcosm of the entire back-and-forth affair.

Adam Dunn and Alex Rios homered to give Chicago a 3-0 lead in the first inning, Mike Moustakas homered to help the Royals score three times in the second, and Kansas City added two more runs in the fourth — one coming on a homer by Francoeur down the third-base line.

The White Sox charged back in the fifth. Dunn and A.J. Pierzynski singled off Royals starter Bruce Chen, and Viciedo connected for a three-run homer and a 6-5 lead.

The Royals were down to their final out in the eighth inning when Cain doubled and Gordon drew a walk. Alcides Escobar came through with a clutch two-run triple.

Broxton, who seems to make every outing an adventure, gave up a single to Youkilis to start the ninth. Dunn and Paul Konerko walked to load the bases with no outs, and after Rios flied out to center, Pierzynski sent an RBI single to right field.

Francoeur came up throwing as pinch-runner Orlando Hudson tried to score. The throw was well up the first-base line, but it arrived in plenty of time for catcher Salvador Perez to lunge back across home and make the tag — even though replays showed that Hudson may have been safe.

Ventura argued to no avail with plate umpire Chris Guccione.

The Royals put a runner aboard with one out in the 10th and couldn't get him home, and loaded the bases with one out in the 11th before Yuniesky Betancourt popped out and Moustakas grounded out to shortstop to keep the game going well into the night.

"It was crazy. You go back and forth, one team goes ahead, the other team goes ahead," Ventura said. "You don't necessarily expect that, but it happens."

NOTES: The White Sox recalled RHP Jhan Marinez from Triple-A Charlotte. He took the roster spot of RHP Deunte Heath, who was optioned to Charlotte last Sunday. Marinez was among the players obtained from the Marlins for manager Ozzie Guillen. ... RHP Luke Hochevar starts Saturday for the Royals against Chicago RHP Jake Peavy.