SAN FRANCISCO (AP) Madison Bumgarner struck out eight over eight innings to win his career-best seventh straight decision, Buster Posey had season-high four hits, and the San Francisco Giants beat the Milwaukee Brewers 3-2 on Tuesday night for their fourth straight victory.

Bumgarner (8-2) allowed four hits and two runs in a 113-pitch performance. His seven-game winning streak spanning 10 starts since an April 20 loss to Arizona is the longest by a Giants pitcher since Barry Zito's seven consecutive victories Aug. 7-Oct. 2, 2012.

Angel Pagan returned from the disabled list with a hamstring injury and scored the go-ahead run in the seventh on a second wild pitch of the inning by loser Will Smith (1-1). Pagan also drove in a run on a groundout in the fifth off Carlos Torres, who relieved after Corey Knebel allowed a single and two walks to start the inning.

More from FoxSports

But Milwaukee tied it on Hernan Perez's RBI single in the sixth that followed a two-out double by Jonathan Villar.

Bumgarner retired the first nine batters before Villar's single up the middle leading off the fourth.