SAN DIEGO (AP) Melvin Upton Jr. lifted a high, fly ball to deep center field with two outs in the 14th inning and watched David Peralta run for the fence and leap.
''Man, I didn't know,'' Upton said. ''He did a pretty good decoy.''
No worries. The ball cleared the fence for a two-run homer that carried the San Diego Padres to a 5-3 victory against Arizona on Saturday night, the Padres' first victory in five home games this season.
''I was running it out; I wasn't sure,'' Upton said. ''But once I saw him put his back against the wall, I knew I had got it and we had a win.''
Upton drove the first pitch he saw from Ruby De La Rosa (0-3) over the center-field fence. He was mobbed at home plate by his teammates after ending the game that lasted 5 hours, 25 minutes.
''The first one at home and obviously we wanted to get that one out of the way,'' Upton said. ''The way we played last night, then to come out with a win, that's back-to-back games we played well and we played hard. We stayed in the game the whole time and that gave us an opportunity to win.''
After the 14th-inning stretch, Wil Myers started the winning rally with his fourth hit of the night, a leadoff single to right off De La Rosa. Travis Jankowski and Adam Rosales struck out before Upton hit his second homer of the season.
''That was kind of close,'' Peralta said. ''That was a deep fly ball. I saw him hit that ball way high and the ball was carrying, carrying, carrying, and I was trying to make a play but I couldn't. I thought it was pretty close.''
Luis Perdomo (1-0) got the win.
''I thought at one point in time I'm going to going to use all 25,'' Padres rookie skipper Andy Green said. ''I don't know if I've ever seen that before. We had everybody get in the mix today, pretty much everybody came in the game and did something positive, and obviously B.J. (Upton) with the last one was huge.''
The Padres got the potential winning run to second with two outs in the ninth before Tyler Clippard got Jon Jay to swing and miss at an eye-level, full-count pitch to end the threat.
The Diamondbacks tied the game at 3 on a wild pitch by Brandon Maurer with two outs in the eighth. Rickie Weeks hit a leadoff double to right and advanced on Paul Goldschmidt's groundout. After Maurer struck out David Peralta, he threw a pitch wide of catcher Derek Norris and Weeks came charging home. Maurer broke a little late to cover home and Weeks slid in just ahead of the tag. The call was upheld after a challenge by Green.
Arizona had runners on first and third with two outs in the ninth against Fernando Rodney before he struck out Jean Segura to end the threat.
The Padres gave starter Andrew Cashner a 3-0 lead after three innings, including Matt Kemp's solo homer.
Cashner gave back one run on Jean Segura's groundout in the fifth, which followed a single by Yasmany Tomas and a double by pinch-hitter Brandon Drury.
The Diamondbacks got an unearned run off Kevin Quackenbush in the seventh. Tomas doubled with one out and took third when left fielder Upton bobbled the ball. He scored on Drury's sacrifice fly.
Diamondbacks starter Shelby Miller left with cuts on both knuckles on his right index finger suffered when he scraped the dirt on his follow-through on a 1-1 pitch to Cashner in the second inning. After walking Cashner to load the bases. Miller was checked by a trainer and pitching coach Mike Butcher. Miller stayed in, but after going 3-0 against Jay, the trainer and Butcher came back out. Miller again stayed in and walked Jay to bring in a run, and was lifted for Matt Buschmann.
Miller said he was frustrated that his injury forced the Diamondbacks to go deep into their bullpen.
''Just some poor mechanics more than anything,'' he said. ''I just sort of fell off the side of the mound that at-bat against Cashner. My mechanics were kind of out of whack. My, hand kind of hit the ground a couple times.
Cashner held the Diamondbacks to one run and four hits in six innings while striking out five and walked two.
Kemp homered to left off Buschmann leading off the third, his fourth and the Padres' first at home this season.
San Diego scored twice against Miller in the second, on two singles and three straight walks.
Diamondbacks: LHP Patrick Corbin (0-1, 3.46 ERA) is scheduled to start the series finale.
Padres: LHP Robbie Erlin (1-1, 0.93) is scheduled to make his second start of the season. He earned a victory in relief in a 13-6 win at Colorado on April 8.