CLEVELAND -- Jason Donald got the game-winning hit.
He was more excited about Travis Hafner's home run that sent Cleveland into extra innings.
Donald singled home the winning run with two outs in the 12th inning, lifting the Indians over the Chicago White Sox 4-3 on Tuesday night. Hafner tied it with a pinch-hit, two-run homer in the ninth.
"I'm happy to win it, but how about Hafner?," Donald said after Cleveland's sixth walkoff win. "You almost wouldn't expect anything else. Whether it was his last homer here or not, it was so cool."
Hafner is scheduled to play in Wednesday's season finale, which could be his last game for Cleveland.
The Indians almost assuredly will not pick up his $13 million option and give him a $2.7 buyout. Before the game, Hafner, 35, who has battled numerous injuries for five years, said, "I want to play next year. I'll have to see who is interested."
"That was huge," interim manager Sandy Alomar Jr. said. "We were waiting for the right opportunity to put Hafner in. Peavy's pitch count was up and first base wasn't open."
Right-hander Nate Jones came on to face announced pinch hitter Matt LaPorta, who was replaced by lefty swinging Jack Hannahan. Jones struck him out before Donald hit a liner into the left-field corner.
"The guys are battling and I'm proud of them," Alomar said. "Jason can play everywhere, so he's getting some at-bats. He came through."
Chris Seddon (1-1) pitched a scoreless 12th for Cleveland's seventh win in 17 meetings with Chicago. It was the left-hander's first victory since July 24, 2010, with Seattle.
Until Hafner delivered, Peavy had allowed only Shin-Soo Choo's 16th homer leading off the fourth. Peavy walked one and struck out eight in what could be his final game for the White Sox.
"He was pitching great," Chicago manager Robin Ventura said.
"It wasn't meant to be," said Peavy, who finished 11-12 with a 3.27 ERA. "It's fitting, the way my year seems to have gone. When I need to catch a break, I can't catch one. A cue ball off the end (of the bat) and the ball hits the foul pole."
Peavy's $22 million option for 2013 almost certainly won't be picked up, but he's hopeful of being in Chicago.
"We'll see how the next few months play out," Peavy said. "This has been a rewarding year as much as it can be. We've had something special here."
Chicago claimed the AL Central lead in July, but went 3-11 the final two weeks to finish second.
Orlando Hudson singled for his third hit before Viciedo drove a 426-foot shot to center for his 24th homer -- and fifth against Cleveland. He is hitting .346 with 18 RBIs against the Indians.
Perez later allowed a one-out single to Jordan Danks and hit Tyler Flowers in the left hand with a pitch. Flowers glared out at Perez and both benches were warned. After Perez retired the side, he and Flowers had an animated talk at the side of the mound. It ended with the pitcher patting Flowers on the back.
"There was no intent to hit him," Alomar said. "It may have looked that way after the homer and I can see why they reacted, but I've never seen C.P. hit anyone on purpose."
Masterson struck out five over six innings in his final start, failing to break his three-game losing streak. He allowed one run, one walk and four hits and finished with an 11-15 record and career-high 206 1/3 innings pitched.
Alomar said before the game that Masterson has the stuff to be a big winner, but remains too inconsistent. He wants Masterson to get downward sink on his pitches rather than side-to-side movement.
"That's what he did tonight, 10 groundball outs and only three fly balls," Alomar said.
Fans chanted "San-dy, San-dy," when Alomar argued a close call at first base. Before the game, Perez said while he respects Manny Acta, he had a problem with the fired manager not confronting umpires. ... Chicago 1B Adam Dunn struck out twice and has fanned 222 times, two shy of the major league record set by Mark Reynolds with Arizona in 2009. ... Chicago 1B Paul Konerko will have surgery on his left wrist Thursday. Manager Robin Ventura said Konerko might play in the season finale on Wednesday. ... The normally quiet Brantley got quizzical looks from teammates before the game as he jogged around the Indians clubhouse carrying a football and wearing a Browns helmet autographed by WR Josh Cribbs and a signed RB Trent Richardson jersey. Nobody seemed to know why.