SAN DIEGO - Justin Upton hit two home runs, including a two-run shot off Jake Peavy, to lead the Arizona Diamondbacks to a 3-1 win over the San Diego Padres on Wednesday night.

It was the first career multihomer game for Upton, who has six homers and 14 RBIs in his last 13.

This was a matchup of teams with two of the worst batting averages in the major leagues. Arizona was last at .226 and the Padres were third-worst at .239.

With John Garland and two relievers combining on a five-hitter, the Diamondbacks snapped a three-game losing streak. San Diego lost for the seventh time in eight games and the 13th time in 16.

Peavy (2-4) lost his third straight decision despite striking out 12. It was the second straight start the Padres failed to score while Peavy was in the game. He held Los Angeles to two hits in eight scoreless innings on Friday night before the Dodgers won 1-0 when Duaner Sanchez walked Russell Martin with the bases loaded.

Peavy raised his career total to 1,308 strikeouts, the 25th active pitcher to reach 1,300. It was the 29th time he reached double digits in strikeouts.

Upton homered to left-center in the fifth inning. Augie Ojeda was aboard on a one-out walk.

Upton homered to center off Sanchez with one out in the eighth.

Garland (3-1) held San Diego to three hits in seven innings. Chad Qualls got out of a bases-loaded jam with no outs in the ninth for his seventh save in eight chances. San Diego got one run when Henry Blanco hit into a double play. Qualls walked Luis Rodriguez before striking out hitter Chase Headley.

San Diego loaded the bases with two outs in the fifth with a single and errors on catcher Miguel Montero and first baseman Josh Whitesell, but failed to score.

Notes:@ Padres vice chairman and CEO Jeff Moorad spent several minutes chatting with the Diamondbacks before they took batting practice. Moorad resigned as CEO in early January and heads a group that currently owns 35 percent of the Padres. "It was an emotional step in a lot of ways to leave an organization that I'd been with for 4 1/2 years," Moorad said. "In my case, maybe a little like a rookie who breaks in with a team. For that reason I was excited to come down and shake a few familiar hands. That having been said, make no mistake about it, I'm wearing a Padres' shirt today. ... Headly (sore shoulder) missed is second straight start in LF. ... Chargers quarterback Philip Rivers, who like Peavy is from Alabama, was at the game. ... The crowd was announced at 15,092. The Padres set records on consecutive nights for their lowest attendance at Petco Park - 14,717 on Monday night and 13,646 on Tuesday night.