DETROIT -- It wasn't pretty or easy but the Detroit Tigers got the win.
The first-place Tigers stretched their lead in the AL Central to 5 1/2 games over third-place Minnesota.
It was Avila's first major league homer, and the son of Tigers' vice president and assistant general manager Al Avila finished with two hits and four RBIs in his second game in the big leagues. Placido Polanco had four hits and drove in a run for Detroit.
Armando Galarraga(6-10) gave up four runs -- three earned -- in five innings for the win. He walked five and struck out three.
"He didn't have his best stuff today. He battled," Avila said. "He was a bulldog out there."
Delmon Young singled in a run and Nick Punto hit a sacrifice fly off Tigers' closer Fernando Rodney in the ninth. Rodney struck out Orlando Cabrera to end the game with runners on first and second and Mauer on deck.
"We got in the right column, it wasn't easy," Detroit manager Jim Leyland said.
Minnesota starter Anthony Swarzak (3-5) allowed seven runs and eight hits in one-plus innings.
"I just couldn't make any of my pitches," Swarzak said. "I wasn't able to stay ahead of the hitters."
Mauer's 19th homer put the Twins up 1-0, but the Tigers answered with six runs in the bottom of the inning. Clete Thomas had an RBI grounder -- which included a rundown of Curtis Granderson between third and home on which Granderson said he was tagged by Twins third baseman Brendan Harris, but wasn't called out and slid in safely at the plate -- Cabrera hit a three-run homer -- his 22nd -- and Avila added his two-run shot.
"We had some bad calls against us and the pitching didn't hold up," Twins manager Ron Gardenhire said. "The guys kept battling all night."
Avila is 4 for 8 with a home run, five RBIs and two doubles in his first two big league games.
"The last two games have been a blast for me," he said.
The Twins came back with three in the second on Span's RBI single and Mauer's two-out, two-run single to make it 6-4.
Another RBI fielder's choice by Thomas increased Detroit's lead to 7-4 in the second and Avila's two-out, two-run double made it 9-4 in the fifth.
The Twins' Jason Kubel had a bases-loaded, two-run double in the sixth to make it 9-6.
"I was proud of the guys tonight, we just kept coming back," Harris said.
Polanco doubled in a run in the eighth.
The Twins acquired RHP Carl Pavano from Cleveland for a player to be named. The 33-year-old, who is 9-8 with a 5.37 ERA, will start Saturday. RHP R.A. Dickey was optioned to Triple-A Toledo and RHP Boof Bonser was transferred to the 60-day DL. ... Tigers RHP Jeremy Bonderman, on the DL after undergoing thoracic outlet compression syndrome surgery, allowed three runs and three hits in an inning in a rehabilitation appearance with Triple-A Toledo. ... Gardenhire was ejected in the top of the second by home plate umpire Hunter Wendelstedt. It was the 46th ejection of his career and fifth this season. ... Polanco's 67-game errorless streak at 2B was snapped by a throwing error in the fourth. ... Twins' SS Cabrera went 1-for-6 to extend his hitting streak to a career-high 17 games.