DETROIT (AP) Anibal Sanchez is earning back the confidence of his manager.

Sanchez pitched six strong innings, and Dixon Machado hit his first career home run to lift the Detroit Tigers to a 6-2 victory over the San Francisco Giants on Thursday.

Sanchez, who pitched so poorly earlier this season that he was sent down to the minors, earned his first victory since Aug. 23, allowing two runs and five hits with eight strikeouts and no walks.

The 33-year-old right-hander has posted a 3.09 ERA in four starts since returning from Triple-A Toledo.

''It's been a hard year for him, the way it's gone on the baseball field,'' Tigers manager Brad Ausmus said.

''The one thing I will say: He always came to the park in a good frame of mind. With that being said, I would think this is extremely gratifying. And he should be, because he's made a 180 turnaround.''

Sanchez (1-0) started the season pitching in relief for the Tigers, and when that didn't go well, he went to the minors for about a month before coming back to the big leagues - and the starting rotation - in the middle of June.

''It's a good story, and it's happening to a good person - which makes it a better story,'' Ausmus said.

Machado was another feel-good story Thursday. His first home run came in the 146th at-bat of his career. The 25-year-old infielder hit a two-run shot in the second that put the Tigers up 4-0.

''I wasn't trying, because when you try, you're going to hit groundballs to third base,'' Machado said. ''I was just trying to bring the run in and that happened.''

Chris Stratton (0-2) allowed five runs and six hits in 6 2/3 innings in his first career start. He took the mound after the Giants scratched right-hander Johnny Cueto before the game because of an inner ear infection.

''Johnny was prepping for the game, but he got dizzy and we just didn't feel comfortable with putting him out there,'' San Francisco manager Bruce Bochy said.

''He had some crud yesterday, but he seemed fine after going through his routine the day before he starts. It just developed overnight into an inner ear infection. We'll see how he is (Friday) and make a decision about using him before the break.''

The Tigers took a 2-0 lead on RBI singles by Miguel Cabrera in the first and Alex Presley in the second. Later in the second, Machado connected for his home run. Detroit players ignored him when he returned to the dugout until Nicholas Castellanos grabbed his head and started playfully rubbing it in celebration.

Presley's RBI single in the third made it 5-0. Joe Panik hit an RBI triple for the Giants in the sixth and scored on Hunter Pence's groundout.

Castellanos added an RBI single in the eighth for the game's final run. Shane Greene, Bruce Rondon and Justin Wilson each pitched a perfect inning in relief for the Tigers.

Sanchez's eight strikeouts were a season high. He didn't even reach that total in any of his Toledo starts.

''Probably I don't have the 97 again on my arm,'' Sanchez said. ''But I've got the command, and I think I want to use it.''

EMERGENCY START

Stratton, who had made nine relief appearances for the Giants since the start of last season, had five walks and one strikeout after he had to pitch on short notice.

''That's not quite how I dreamed things up, but today was still a dream come true,'' he said. ''I've always wanted to have the chance to compete at this level as a starting pitcher, and today I showed myself that I can do it.''

TRAINER'S ROOM

Giants: LHP Madison Bumgarner (ribs, shoulder) allowed nine runs in four innings in a rehab start for Class A San Jose on Wednesday night. He threw 76 pitches. ''He'll pitch again down there, and we'll extend him to around 90 pitches, after that start, we'll see where we're at, we'll evaluate him, and he should be ready to join our rotation,'' Bochy said.

Tigers: Detroit put LHP Daniel Norris on the 10-day DL with a strained left groin.

UP NEXT

Giants: San Francisco returns home for a three-game series with Miami before next week's All-Star break. LHP Matt Moore (3-8) starts Friday night for the Giants against RHP Dan Straily (6-4).

Tigers: Detroit visits Cleveland for three games, with RHP Jordan Zimmermann (5-6) starting Friday night for the Tigers against RHP Carlos Carrasco (9-3).

---

More AP baseball: https://apnews.com/tag/MLBbaseball

---

Follow Noah Trister at www.Twitter.com/noahtrister

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.