MIAMI (AP) -- Giancarlo Stanton showed how much more potent the Miami Marlins are when he is in the lineup.
Stanton hit his first homer since coming off the DL, a two-run drive with two outs in the eighth inning that lifted the Miami Marlins to a 5-4 victory over the Milwaukee Brewers on Tuesday night.
With Juan Pierre on first following his one-out infield single on the eighth pitch, Stanton connected on a first-pitch slider from Jim Henderson (2-2). It was his fourth home run this year.
''It was all set up by J.P. with that great at-bat and giving the big boy a chance to get up there and make that great swing and win the game,'' manager Mike Redmond said.
Henderson struck out Ed Lucas for the second out before Stanton's drive.
''I felt like my stuff was pretty sharp. Stanton was looking for that one pitch. I left it up,'' Henderson said.
Stanton hit his first three homers in the two games before straining his hamstring on April 29. He went on the disabled list the following day and was activated Monday.
''It's a good start, but we can't really tell (if I'm picking up where I left off), especially with the few at-bats I've had so far,'' Stanton said. ''It's a good start to move forward from.''
Chad Qualls (2-0) pitched a perfect eighth and Steve Cishek a scoreless ninth for his seventh save.
''Stanton was getting hot before he got hurt, and to have him back and have (Logan Morrison) back and (Marcell) Ozuna swinging the way he is it takes pressure off the other guys,'' Qualls said.
Derek Dietrich had a two-run homer for Miami, which has won three of four.
The Brewers took a 4-3 lead in the seventh when Yuniesky Betancourt tripled in a run to tie it before scoring the go-ahead run on pinch-hitter Scooter Gennett's suicide squeeze.
Milwaukee's four-game winning streak was snapped.
Wily Peralta allowed three runs and five hits - all in the second inning - with a walk and a strikeout in six innings.
Jacob Turner gave up four runs - three earned - and five hits in seven innings. He walked two, struck out six and threw two wild pitches.
''We got the win, so it wasn't too bad,'' Turner said of his outing.
After Rickie Weeks walked with one out in the seventh, Betancourt hit a line drive to right. Stanton ran to his left and slid feet first but failed to stop the ball from getting past him for a triple.
Betancourt broke from third as Gennett, hitting for Peralta, laid down a bunt to third baseman Ed Lucas. Betancourt scored before Lucas threw out Gennett.
Dietrich's two-run homer highlighted Miami's three-run second.
Marcell Ozuna opened with a single and scored on Morrison's double to left-center. Dietrich followed with his sixth home run, a shot to right.
''To have LoMo and Stanton back in the lineup is a big lift,'' Redmond said. ''LoMo was behind me when Stanton hit that home run and he gave me about three rob shots. I might need an ice pack.''
Milwaukee scored an unearned run in the fourth to make it 3-1.
Carlos Gomez led off by reaching first when Turner threw a wild pitch on a swinging strike three. Gomez advanced to third on Turner's errant pickoff throw and scored on Jonathan Lucroy's sacrifice fly.
Milwaukee manufactured a run in the sixth to get to 3-2.
Jean Segura opened with a single off Lucas' glove and then stole second. He advanced to third on Gomez's grounder to second and scored when Aramis Ramirez grounded out to third.
NOTES: The crowd of 13,110 was a season-low at Marlins Park. ... LF Ryan Braun (right thumb) was not in the Brewers lineup for a second straight night. Braun and the Brewers hope a trip to the disabled list can be avoided. ... Marlins manager Mike Redmond said OF Chris Coghlan would be ''out for a while'' after an MRI showed a back strain. Coghlan was put on the 15-day disabled list Sunday with what then was called a right calf nerve irritation.