Diamondbacks center fielder A.J. Pollock didn't hit well on the team's recently completed six-game road trip, batting just .125 in 24 plate appearances against the St. Louis Cardinals and New York Mets.

The rest of the team didn't fare much better, going 2-4 on the trip after hitting .159 and scoring a total of 11 runs.

Upon returning to Chase Field on Memorial Day, though, both Pollock and the Diamondbacks had an offensive resurgence. The Diamondbacks clubbed 10 hits, and Pollock hit a game-ending two-run homer in the bottom of the ninth to give Arizona a 7-5 victory over the San Diego Padres.

It was the first walk-off home run of the 26-year-old's career.

"Those kids, they come up here and we say, 'C'mon, start your scrapbook up,'" Diamondbacks manager Kirk Gibson said. "You have moments like that; they're very impactful in helping you believe when you get in situations for the rest of your career. It was a big moment for him and us."

The Diamondbacks entered the bottom of the ninth locked in a 5-5 tie after twice squandering a lead.

Arizona led 2-0 after the second but was touched for four runs in the fifth, all on a pair of home runs surrendered by starter Brandon McCarthy.

The Diamondbacks reclaimed the lead with a three-run sixth but gave it right back in the bottom of the frame on back-to-back doubles by pinch-hitter Tommy Medica and shortstop Everth Cabrera, the last off reliever Joe Thatcher.

McCarthy was charged with all five runs, taking a no-decision after lasting 62/3 innings. He struck out four and walked none but gave up nine hits.