SAN DIEGO -- Cory Spangenberg hit his first major league home run with one out in the bottom of the ninth Tuesday night to give the San Diego Padres a 2-1 walk-off win over the Arizona Diamondbacks at Petco Park.

Spangenberg, who was pinch-hitting for center fielder Cameron Maybin, hit a line drive into the short porch in right came on the first pitch from Arizona right-handed reliever Brad Ziegler.

Spangenberg had a two-run single in his major league debut Monday.

Padres reliever Kevin Quackenbush (3-3) got the win. Ziegler (5-3) took the loss.

The win was the Padres sixth in eight games on this homestand.

Starting pitchers Wade Miley of the Diamondbacks and Odrisamer Despaigne of the Padres departed after seven innings with the score tied 1-1.

Miley allowed seven hits and two walks with five strikeouts. He also picked two Padres off first. Despaigne allowed four hits and no walks with four strikeouts. He picked one Diamondback off first.

The Diamondbacks used three singles in the top of the fourth to end the scoreless tie.

Back-to-back hits leading off the inning by second baseman Cliff Pennington and right fielder David Peralta put Diamondbacks at first and third and no one out. Despaigne struck out first baseman Mark Trumbo, but catcher Miguel Montero flared a single to center to drive in Pennington.

The Padres tied the game in the bottom of the fifth.

Catcher Rene Rivera opened with his second single to end a run of eight straight outs recorded by Miley. Rookie right fielder Rymer Liriano doubled into the right-field corner to move Rivera to third. After Maybin struck out, shortstop Alexi Amarista drove Rivera home with a single to right.

NOTES: The Diamondbacks activated OF A.J. Pollock (fractured right hand) and INF Chris Owings (left shoulder strain) from the 15-day disabled list. Further September call-ups could come after Triple-A Reno and Double-A Mobile complete postseason play. ... The Padres added four more players to their roster: RHPs Joe Wieland and R.J. Alvarez, LHP Frank Garces and C Adam Moore. Because Moore and Alvarez had to be added to the 40-man roster and Wieland had to come off the 60-day disabled list, the Padres made three other moves. 3B Chris Nelson and LHP Troy Patton were designated for assignment, and INF Ryan Jackson was promoted from El Paso and transferred to the 60-day DL with a wrist strain. In addition, the Padres brought in RHP Matt Wisler from El Paso for a recon assignment. Wisler, 22, was not activated or added to the 40-man roster.