Originally published Monday, July 30, 2018 at 06:24a.m.

SAN DIEGO (AP) — Three home runs, two video reviews that went their way and some nice defense helped the Arizona Diamondbacks beat the San Diego Padres 5-4 Sunday for a three-game sweep.

Paul Goldschmidt and Nick Ahmed each hit a two-run homer and A.J. Pollock also connected for the Diamondbacks, who bounced back nicely after a disappointing loss Thursday at the Chicago Cubs in which they blew a five-run lead.

"You come into an opposing ballpark and you're playing for a sweep, you're going to get some of their best," Arizona manager Torey Lovullo said. "We made plays when we had to. It wasn't pristine, but I'll take the win anyway."

Arizona took a 5-2 lead in the fourth but had to hold on. The Padres pulled within a run on A.J. Ellis' RBI single in the sixth that chased Clay Buchholz, and Freddy Galvis' RBI double off Archie Bradley with one out in the eighth that was almost a tying, two-run homer.

Galvis' fly ball, which went over the glove of left fielder Jon Jay and bounced off the top of the wall and back onto the field, was reviewed by the umpires and upheld.

Another review went the Diamondbacks' way earlier in the inning when Eric Hosmer was originally ruled safe at second on Christian Villanueva's single to right. But after replay, it was ruled that right fielder Steven Souza Jr.'s throw to Ahmed, the shortstop, was in time to get Hosmer. Souza had faked a dive that made Hosmer hold up just enough, and then made a perfect throw to second. Ahmed stretched like a first baseman to take the throw.

"Those are the fundamental-type plays that we make," Lovullo said. "Key things that we do in those moments are why we're winning games."

And why the Padres aren't.

"It was a tough series, today especially," manager Andy Green said. "It seems like one of those situations where things are just going against us. You've got to rise up and turn the tide on them."

Green said he thought replay officials got both calls right, "So I don't really have a major complaint or comment on that."

But he said it would have been nice if Galvis' fly ball had gone a few inches more.

"It stings. That's the way things have gone for us," Green said. "Waiting for that big swing, and that looked like a big swing for us, and just seemed like a couple inches shy. Our guys fought today. I like seeing that fight."

All three Diamondbacks homers came off rookie lefty Joey Lucchesi (5-6). With Ketel Marte aboard on a walk, Goldschmidt lined his 23rd homer off the lower deck of the Western Metal Supply Co. brick warehouse in the left-field corner for a 2-0 lead after just three batters.

San Diego tied it on Wil Myers' two-run double in the third, but the Diamondbacks went back ahead 5-2 in the fourth on moonshot homers by Pollock and Ahmed. Pollock led off with his 13th, to center. With Souza aboard on a single, Ahmed went deep to left, his 14th.

Buchholz allowed three runs and six hits in 5 2/3 innings, struck out seven and walked three. He allowed Eric Hosmer's leadoff single in the sixth and then struck out Villanueva and Galvis, but walked Carlos Asuaje before allowing Ellis' RBI single. Buchholz was lifted for Yoshihisa Hirano, who got pinch-hitter Jose Pirela to hit into a force.

Lucchesi allowed five runs and six hits in 4 1/3 innings, struck out three and walked three.

WEIRD MOMENT

The Diamondbacks had to use a mound visit in the sixth after Buchholz was startled by the noise of a T-shirt gun in the stands as he threw a pitch and the trainer came out to check on him. "They thought something was going on but there was nothing going on," he said. "I actually got scared while I was throwing a pitch."

TRAINER'S ROOM

Diamondbacks: LF David Peralta left the game with right shoulder tightness. He was replaced by Jon Jay.

Padres: Green said an MRI on RHP Luis Perdomo's strained right shoulder showed no structural damage. He's expected to spend a couple of weeks on the DL.

UP NEXT

Diamondbacks: Return home for a two-game series starting Monday night, when LHP Robbie Ray (3-2, 4.90) is scheduled to start opposite LHP Martin Perez (2-4, 7.08).

Padres: Rookie LHP Eric Lauer (5-7, 5.29) is scheduled to open a two-game series against San Francisco, which will counter with Derek Holland (5-8, 3.92).