Randy Johnson fanned nine to tie Roger Clemens for second in career strikeouts Thursday night, but Arizona's bullpen blew a lead and Randy Winn's ninth-inning home run gave the San Francisco Giants a 4-3 victory.

Winn's second solo home run of the night allowed the Giants to complete a three-game sweep and hand the Diamondbacks their season-worst fourth straight loss.

Tony Pena walked in the tying run in the eighth, then Chad Qualls gave up the leadoff homer to Winn. Arizona was swept for the second time in three series and has dropped eight of 10.

Johnson, who left the game with a 3-2 lead after seven innings, has struck out 19 _ in 13 innings _ in his last two starts to tie Clemens with 4,672 strikeouts.

The tying strikeout came when the 44-year-old left-hander fanned Dan Ortmeier for the third time of the night to start the seventh inning. Johnson drew a standing ovation as he left the field. He was lifted for a pinch hitter in the bottom of the inning with Arizona leading 3-2.

Johnson, who returned to the Arizona rotation after his second back surgery in as many years, allowed two runs on six hits and walked one.

Justin Upton, 13 months old when Johnson made his major league debut on Sept. 15, 1988, hit a solo home run in the second, then tripled in the go-ahead run in the sixth for Arizona. Both hits came with two outs one game after Upton ended an 0-for-27 skid.

Pena walked pinch hitter Fred Lewis on five pitches with the bases loaded to deprive Johnson of his 289th career victory. The run was unearned because of first baseman Conor Jackson's fielding error.

Pena walked two and hit a batter in two-thirds of an inning as Johnson had a no-decision despite a strong outing for his second start in a row.

Qualls (0-5) came on to strike out pinch hitter Steve Holm to end the inning but allowed Winn's homer to left on a 1-0 pitch in the ninth. Brian Wilson threw a perfect ninth for his NL-leading 16th save in 18 opportunities.

Tyler Walker (3-3) pitched a scoreless eighth to get the victory.

Both of Upton's hits came off Barry Zito, who allowed three runs on six hits in six innings. He struck out five and walked three.

Johnson retired the first nine he faced, five by strikeouts, before Winn's home run leading off the fourth. His third homer of the season came with a 3-2 count on the 10th pitch of his at bat.

Aaron Rowand doubled with one out, then scored on Omar Vizquel's two-out single to put San Francisco ahead 2-1.

Arizona tied it in the fourth. Orlando Hudson doubled down the left field line, then scored on Jackson's single.

Zito retired the first two batters in the sixth, then walked Mark Reynolds. Upton had an 0-2 count when he lashed an RBI triple into the right-center gap and Arizona led 3-2.

Notes:@ Vizquel will be honored in a pre-game ceremony in San Francisco on Friday for his 2,586 games at shortstop, most at the position in MLB history. ... Double plays erased Arizona base runners in the first two innings. ... Arizona has three of the five players with the most strikeouts in the NL _ Upton (64), Reynolds (63) and Chris Young (57).