Updated

Phoenix, AZ (SportsNetwork.com) - A.J. Pollock hit a two-run home run in the ninth inning to send the Arizona Diamondbacks to a 7-5 win over the San Diego Padres in the opener of a three-game set.

"You come in here every day and put a lot of swings in the cages and you work hard and it's really cool when you actually get up there when the team needs you in late innings and be able to win a game," Pollock said.

Kevin Quackenbush (0-1) hit Cliff Pennington with a pitch with one out in the ninth, but then got Eric Chavez to hit into a fielder's choice for the second out. Pollock, though, drove a pitch over the center-field wall to win the game.

"They got the last at-bat and put a good swing on a high fastball," Padres manager Bud Black said.

Pollock went 3-for-5 with two runs scored, while Martin Prado had two hits, and RBI and a run scored for the Diamondbacks, who have won three of four.

Brandon McCarthy gave up five runs on nine hits over 6 2/3 innings, while Brad Ziegler (1-1) pitched two scoreless innings for the win.

Everth Cabrera hit a three-run home run and drive in four, while Yonder Alonso added a solo shot for the Padres, who have lost six of eight. Tyson Ross gave up five runs -- four earned -- on nine hits over five-plus innings in the start.

The Diamondbacks went on top in the second inning when Pennington punched a single to left with two men on. Alexi Amarista misplayed the ball and both runners came home for a 2-0 lead.

San Diego stranded a man on third base in the third, but went on top in the fifth. Alonso led off the frame with his third home run of the season. Following two-out singles from Amarista and Ross, Cabrera blasted a pitch over the right-field wall for a 4-2 lead.

Arizona, though, got five straight hits to start the sixth. Pollock led off the frame with a single and Gerardo Parra reached base on a bunt. Paul Goldschmidt and Miguel Montero each brought home a run with a single, and Prado doubled in another run for a 5-4 advantage.

Nick Vincent took the mound and set down the next three batters to limit the damage.

The Padres answered in the seventh to tie the game as Tommy Medica smacked a pinch-hit double and Cabrera doubled him home off Joe Thatcher.

Game Notes

Arizona took two of three in San Diego earlier this month ... The Diamondbacks were 4-for-9 with runners in scoring position ... Arizona second baseman Aaron Hill didn't play due to a left ankle problem. He fouled a pitch off his ankle in the second game on Sunday against the Mets and was later removed. He was available to pinch-hit. Pennington took his spot in the lineup.