Torii Hunter hit a three-run walk-off homer Thursday to give the Tigers a 7-6 win over the Oakland A’s on Thursday at Comerica Park.

Hunter and the Tigers avoided a four-game sweep at the hands of the A’s.

The Tigers overcame a rough outing by Max Scherzer who lasted just five innings and gave up eight hits and six runs (five earned). He was going for his 20th win but instead will remain at 19-1.

The winner was Joaquin Benoit (4-0) who gave up two hits in the ninth but did not surrender a run.

The Tigers entered the ninth trailing 6-3. Grant Balfour (0-3) walked Austin Jackson. After Andy Dirks popped out and Alex Avila struck out Jackson took second on catcher’s indifference. Prince Fielder walked and then Jackson scored on a single by Victor Martinez. Jose Iglesias was inserted as a pinch runner for Martinez.

Hunter took a 1-1 pitch from Balfour deep into left-center for the winner.

Miguel Cabrera left the game after sliding into second base in the fifth inning. He grabbed his left leg but the Tigers later said he was experiencing abdominal discomfort. His status is considered day to day.

Cabrera got two hits before being injured increasing his major league-leading batting average to .359. He leads baseball with 130 RBIs and his 43 homers trail only Baltimore’s Chris Davis.

Scherzer’s bid to be the first pitcher in the major leagues with 20 wins this season didn’t look good at the start.

Coco Crisp led off the game with a double and Jed Lowrie hit a one-out two-run homer on a thigh-high 92-mph fastball. Scherzer held the A’s to only one hit over the next two innings but they built a four-run cushion in the fourth on sacrifice flies by Daric Barton and Eric Sogard.

Josh Donaldson hit a leadoff triple in the fifth and Brandon Moss homered deep into the right-field seats to make it 6-1.