SAN FRANCISCO (AP) A small tweak to his delivery has produced favorable results for Drew Pomeranz.

Pablo Sandoval, Kevin Pillar and Mike Yastrzemski homered and Pomeranz pitched into the sixth inning, helping the San Francisco Giants beat the Milwaukee Brewers 5-3 on Friday night.

Last-place San Francisco earned its third straight win and seventh in 11 overall. Pomeranz (2-6) allowed two unearned runs in five-plus innings in his first win since April 24.

The 30-year-old left-hander gave up five hits in his second straight solid start after going 0-3 with a ghastly 19.16 ERA in May. He struck out five and walked three.

Pomeranz attributes better command to a more over-the-top delivery.

''For the most part, I was able to throw strikes when I needed to,'' said Pomeranz, who signed a one-year, $1.5 million free-agent contract with the Giants in the offseason.

''I think, hopefully, I've found the thing that I've been waiting on to click.''

Pomeranz got a no-decision despite pitching five scoreless innings in a 2-1 victory over Clayton Kershaw and the NL West-leading Dodgers on June 7.

''The last two outings he's been a different guy,'' Giants manager Bruce Bochy said.

''He's got to feel good about his little adjustment and should have a lot of confidence with that move.''

Yastrzemski's two-run drive to center off Alex Claudio made it 5-2 in the seventh. It was the second homer for the grandson of Hall of Famer Carl Yastrzemski since making his major league debut May 25.

Milwaukee right-hander Zach Davies (7-1) permitted three runs and six hits in five innings in his first loss since Sept. 22 at Pittsburgh. Davies was the first Brewers starter to open a season with seven straight winning decisions.

The NL Central-leading Brewers had won five of six.

After Yastrzemski connected, Milwaukee got one back in the eighth when Jesus Aguilar scored on a wild pitch. But Mark Melancon got Lorenzo Cain to fly out with the tying runs in scoring position.

Will Smith worked a scoreless ninth for his 17th save in 17 attempts.

The Giants took a 2-1 lead on Sandoval's two-run homer off Davies in the fourth. Sandoval's ninth homer was an opposite-field shot to left.

Pillar snapped a 2-2 tie with a solo drive in the fifth for his eighth of the season.

''Two pitches, one to Pablo and one to Kevin,'' Davies said. ''That's the way it goes sometimes. I kept the slider down and got some ground balls, but at the end of the day two pitches can decide the ballgame.''

MVP STUFF

Milwaukee star Christian Yelich went 1 for 4 with a walk and an RBI single, extending his hitting streak to 11 games. The reigning NL MVP also stole his 15th base in 16 attempts to move into a tie for the NL lead with Arizona's Jarrod Dyson.

HARD SLIDE

Pillar knocked second base from its anchor several feet toward third on a hard slide in the seventh. Pillar beat a throw from first baseman Jesus Aguilar on a pickoff attempt.

Brewers manager Craig Counsell challenged the safe call, but it was upheld on replay.

''My initial instinct was to try to reach for the base,'' Pillar said.

''You just hope that you beat the throw there, and you get there, and the base is no longer there. It's a stressful situation.''

TRADED

The Brewers traded right-hander Jake Petricka to the Texas Rangers in exchange for a player to be named or cash.

WORTH NOTING

Giants first base coach Jose Alguacil missed the game to attend his son's graduation. Field coordinator Antoan Richardson replaced him.

TRAINER'S ROOM

Brewers: RHP Jhoulys Chacin (lower back) threw a side outing and is expected to come of the injured list to start Monday's game in San Diego, manager Craig Counsell said. ... LHP Gio Gonzalez (left arm) threw on flat ground. It's not known when he'll be able to throw off a mound.

UP NEXT

Brewers: RHP Jimmy Nelson (0-1, 12.00 ERA) will make his second start after missing all of 2018 recovering from right shoulder surgery. He is 2-2 with a 5.28 ERA in five career starts against San Francisco.

Giants: LHP Madison Bumgarner (3-6, 3.83 ERA) is 7-4 with a 2.63 ERA in 12 career starts against the Brewers.

---

More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.