MINNEAPOLIS -- The Cleveland Indians hope Wednesday's rally will help turn things around.

Michael Brantley hit a sacrifice fly in the 12th inning and the Indians came back to beat the Minnesota Twins 9-8.

Carlos Santana and Jason Giambi homered for the Indians, who won for just the third time in 10 games.

Joe Mauer tied a career high with five hits for Minnesota.

"When you get a win like today where you go back and forth ... it's definitely crucial," said Mike Aviles, who had a pair of RBIs.

Nick Swisher and Jason Kipnis singled off Ryan Pressly (3-3) to open the 12th. Swisher moved to third on a fly out and scored easily on Brantley's fly out to center field.

Chris Perez (5-2) blew a save but got the win. Joe Smith earned his second save, including a strikeout of Mauer to end the game.

Santana homered off Glen Perkins in the 10th to give Cleveland an 8-7 lead. Mauer responded in the bottom half with a shot off Perez.

The Indians, who trail Detroit by six games in the AL Central, were swept at home by the Tigers last week and then lost two of three at home to the Los Angeles Angels. After losing 3-0 to the Twins on Monday, Cleveland has won two straight.

Cleveland trailed 7-3 entering the eighth inning. After the first two batters reached base against Casey Fien, Brantley had an RBI single and Giambi followed with a three-run homer that tied it.

"I'm a strike thrower. I'm going to pitch to contact, and today they got me," Fien said. "I left the ball up in the zone to Giambi, and he hurt me."

Minnesota starter Kyle Gibson allowed six hits and three earned runs in 5 1/3 innings, the fourth straight start he's failed to go at least six innings.

Josh Roenicke, Caleb Thielbar and Jared Burton pitched 1 2/3 innings of scoreless relief before Fien struggled in the eighth.

"Casey's been lights out, one of the better setup guys in our league, since we put him in that role," manager Ron Gardenhire said.

Looking to build on the confidence gained from pitching one-hit ball in five relief innings last Friday, Cleveland starter Carlos Carrasco allowed 10 hits and four earned runs in 4 1/3 innings. Carrasco, who was recalled from Triple-A Friday, is winless in seven starts this year and hasn't won since June 29, 2011, at Arizona.

Mauer, who singled and moved to third on a double by Justin Morneau, scored on a first-inning sacrifice fly by Josh Willingham. Morneau then scored on a double by Oswaldo Arcia. Brain Dozier and Mauer had RBI singles in the second to give Minnesota a 4-0 lead.

The Twins went 6 for 13 with runners in scoring position after going 3 for 48 over their last six games. Minnesota entered the game last in the American League, hitting .230 in such situations.

Mauer hit a two-run single in the sixth and Chris Colabello an RBI single in the seventh to make it 7-3.

Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.