Updated

PHOENIX (AP) — Adam LaRoche homered twice and the Arizona Diamondbacks matched a team record by connecting six times in a 13-1 rout of the San Francisco Giants on Wednesday night.

Kelly Johnson hit his NL-leading 12th homer while Justin Upton, Stephen Drew, and Chris Snyder also went deep for the Diamondbacks. San Francisco had allowed a league-low 24 home runs going into the game.

LaRoche finished with four RBIs and Drew and Snyder each had three for Arizona, which ended a six-game home losing streak.

Ian Kennedy (3-2) struck out a career-high nine and allowed one run on three hits in eight innings.

Todd Wellemeyer (2-4) remained winless on the road after giving up five runs on four hits in five innings.

Kennedy allowed a run on two hits in the first inning but shut the Giants down after that. Acquired in the offseason from the New York Yankees in a three-team trade that also included the Detroit Tigers, the right-hander set down 13 straight at one point and walked only three while throwing 116 pitches.

Playing in front of 17,073, its smallest home crowd of the season, Arizona reached double digits in scoring for the fifth time this season and the second time in five games.

The Giants allowed a season high in runs and tied a franchise high for homers allowed. The last time it happened was April 19, 1996, at the Chicago Cubs.

Wellemeyer's struggles on the road continued. He fell to 0-3 and has given up 18 earned runs in 17 1-3 innings in four starts away from San Francisco. He allowed only four hits in this one, but three were home runs.

The Diamondbacks tied it at 1 in the second on a solo shot by LaRoche, went ahead 2-1 on Upton's homer in the fourth and pushed their cushion to four runs on Drew's three-run drive in the fifth.

Snyder and Johnson each added two-run homers later, and LaRoche had a three-run shot in the eighth. It was his 14th career multihomer game.

The Giants took a 1-0 lead in the first on Pablo Sandoval's RBI single.

NOTES: San Francisco activated 2B Freddy Sanchez from the 15-day disabled list prior to the game. Sanchez had missed all of spring training and the first 38 games of the regular season after undergoing surgery on his left (non-throwing) shoulder in December. OF Eugenio Velez was optioned to Triple-A Fresno to make room on the active roster. ... Arizona optioned OF Cole Gillespie to Triple-A Reno and called up OF Gerardo Parra before the game. ... The Giants fell to 4-11 against the NL West.

(This version CORRECTS Diamondbacks 13, Giants 1. SUBS 8th graf to correct last time Giants gave up 6 homers in a game.)