Kevin Youkilis hit a sacrifice fly in the 14th inning, and the Chicago White Sox outlasted the Kansas City Royals 9-8 to win a game that stretched into the wee hours of Saturday morning.

Gordon Beckham drew a one-out walk off Everett 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. On the 14th pitch of his at-bat, Youkilis managed to send a fly ball to deep center field.

Youkilis has five game-winning hits in 14 games with the White Sox.

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.

Each team burned through nine pitchers, setting a franchise record for the Royals. Teaford was actually scheduled to start Tuesday night before getting pressed into relief duty.

The game nearly ended in the 13th inning, when 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 of his own 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 of them 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 Alex 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 nobody out, 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.

White Sox manager Robin Ventura argued with plate umpire Chris Guccione to no avail.

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.

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.