The Mariners (54-63) avoided the sweep after surrendering 27 hits and 20 runs to Milwaukee over the first two games of the series.

Hernandez almost single-handedly made certain that the Brewers (51-67) wouldn't unload again on this day, allowing just four hits while not allowing a runner past first base after the second inning. He had nine strikeouts while allowing just one walk on a day when Milwaukee starter Wily Peralta was almost as good while pitching a complete game.

Peralta (8-12) gave up just four hits in eight innings of work, with his only two mistakes coming on a run-scoring wild pitch and Justin Smoak's fifth-inning homer.

"He's unbelievable," Peralta said of Hernandez while shaking his head. "When you face guys like that, you can't make mistakes. I made the mistake first (on Smoak's homer)."

Farquhar gave up a ninth-inning single but didn't allow a run to earn his fourth save of the season. He replaced Tom Wilhelmsen as Mariners closer earlier this month and is perfect in save opportunities.

Hernandez (12-5) had thrown 108 pitches through the eighth inning, and the Mariners didn't want a replay of his July 26 start that saw Hernandez throw eight shutout innings before allowing a run in the ninth of a 3-2 Seattle loss in extra innings.

"I got up to 108 pitches there, and I was really tired, so I had enough," Hernandez said.

Thompson said he consulted Hernandez in the dugout before the ninth inning, and the Mariners starter told him to bring in a reliever.

"He was pretty much at the end of his rope," Thompson said. "He threw 20 pitches in the eighth, and he was ready to pass the ball on to Danny. He'd had enough."

Said Hernandez of asking out of the game after eight shutout innings: "I'm just being honest. I don't want to go out tired and lose the game."

The Mariners scored the first run on a Peralta wild pitch in the third inning. Dustin Ackley slid under Peralta's tag at home plate to give Seattle a 1-0 lead.

Smoak extended the lead to 2-0 with a solo home run in the fifth, his third home run of the six-game homestand.

Milwaukee's only real threat came in the second inning, when a Caleb Gindl walk and Juan Francisco double put two runners in scoring position with one out. But Hernandez got a strikeout and popout to strand both runners. That marked the only a Brewers runner got past first base.

Hernandez earned his first win in five games after winning three consecutive starts in July.

Notes: Seattle manager Eric Wedge visited the clubhouse before Sunday's game, telling KIRO radio that he hopes to be back by the next homestand that begins Aug. 23. Wedge has been out since July 22, when he left batting practice because of dizziness that was later diagnosed as a minor stroke. ... The Mariners named RHP Erasmo Ramirez as their Tuesday starter at Tampa Bay. Ramirez (3-0) hasn't started since Aug. 3, when he failed to earn a decision in an 8-7 loss to the Red Sox. He pitched an inning of relief Friday night, his first appearance out of the bullpen this season. ... Seattle 2B Nick Franklin did not play Sunday because of a sore throat. ... The Brewers fell to 3-9 in interleague games this season with the loss. Both Milwaukee and Seattle have Monday off.

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