DETROIT (AP) -- The Detroit Tigers were headed for a here-we-go-again loss until Marcus Thames hit a tying homer with two outs in the ninth inning.
Then, Placido Polanco gave them a rare win at home in extra innings.
Polanco singled home the winning run in the 12th and Detroit rallied to beat the Chicago White Sox 6-5 on Sunday after blowing a three-run lead.
Detroit squandered leads in its previous three games, too, losing twice in extra innings with a surprisingly shaky bullpen.
"It strikes a vote of confidence and changes the atmosphere on the airplane. It was big," winning pitcher Jason Grilli said before the team flew to Los Angeles. "We didn't want these guys to think they got the best of us still because these guys gave us the hardest time last year.
"Everybody did their part, but we wouldn't have gone to extra innings if it wasn't for Marcus."
Thames hit a two-run shot off David Aardsma to tie the score at 5.
"That's what power can do for you," Detroit manager Jim Leyland said. "Nobody can catch those."
Wilfredo Ledezma entered in the ninth and pitched three scoreless innings before Grilli (1-1) worked a perfect 12th. Detroit ended a season-high three-game skid and avoided a three-game sweep against one of its AL Central rivals.
The Tigers lost their previous three extra-inning games at home this year and hadn't won one in Detroit since June 24 against St. Louis.
Ivan Rodriguez drew a leadoff walk, his first of the season, in the 12th against Nick Masset (1-1) and advanced to second on Brandon Inge's sacrifice. After Boone Logan walked pinch-hitter Craig Monroe, Polanco drove in Rodriguez with a single to left.
"I wanted to get the first guy out, but I didn't and I had to pitch to Polanco," Logan said. "I tried to get a fastball in, and I didn't get it in enough. I thought I could get a groundball and get out of the inning, but I didn't get it in enough and he hit it over third."
Polanco is hitting .377 overall and .421 with runners in scoring position.
"Right now, it's the Polanco show," Grilli said. "When he came up to bat in that situation, I had a feeling the game was over. There's no one you would rather have up there."
Jon Garland was dominant after giving up three runs in the first and the White Sox came back to take a 5-3 lead on Joe Crede's two-run homer in the eighth inning. A.J. Pierzynski also connected for Chicago.
"This is tough because we had them right where we wanted them," Aardsma said. "We had the game, and we gave it to them."
White Sox manager Ozzie Guillen said he didn't want to use a few of his top relievers, such as closer Bobby Jenks, because they had a lot of work recently while helping the team rally for wins in Detroit.
"It's a broken heart, no doubt, but there's nothing you can do," Guillen said. "We had our chances."
Chicago had won a season-high four straight.
For the second consecutive game, Detroit's offense got off to a good start before being shut down. The Tigers scored three runs in the first inning before Garland retired 18 straight batters.
In Chicago's 7-5 win in 10 innings Saturday, Jose Contreras retired 16 in a row after giving up a grand slam in the first.
Garland gave up three runs -- two earned -- and five hits in eight innings. Magglio Ordonez capped the three-run first inning with a two-run single.
Detroit starter Justin Verlander allowed three runs, four hits and five walks over seven innings. He was replaced by Aquilino Lopez, who gave up a leadoff single to Jermaine Dye in the eighth and one-out homer to Crede.
Chicago pulled within two in the second on Pierzynski's solo homer, then tied it 3-all in the fifth.