Ryan O’Hearn made his first impact with the San Diego Padres after being acquired at the trade deadline. O’Hearn came to the plate to leadoff the top of the ninth inning with the San Diego Padres trailing the Arizona Diamondbacks, 2-1. O’Hearn delivered a game-tying solo home run to right-center field to make the score 2-2 and propel the Padres to a 3-2 win at Chase Field, Wednesday.

Xander Bogaerts followed O’Hearn with a double to the left-center field gap and Jake Cronenworth laid down a sacrifice bunt to move Bogaerts to third base with one out. Jose Iglesias put San Diego on top with an RBI-single to right field that scored Bogaerts and gave the Padres their first lead of the game.

The Padres did not settle with the one-run lead and continued to pressure the Diamondbacks. Freddy Fermin singled to center to push Iglesias to third base. San Diego had runners at the corners with one out and Fermin advanced to second on a pitch in the dirt. Luis Arraez hit a sharp ground ball to third that was fielded by Blaze Alexander and he threw home in time to get Iglesias for the second out of the inning. The Padres had runners at the corners with two outs and Ramon Laureano flied to right field to end the inning.

Mason Miller was called on in the bottom of the ninth inning to try to get his first save with San Diego. He faced Lourdes Gurriel Jr., who hit a game-tying homer off him on Tuesday. Miller struck out Gurriel Jr. on three pitches for the first out of the inning. Miller then struck out Tyler Locklear on three pitches and allowed a two-out walk to Alexander. Miller recorded his third strikeout of the inning against pinch-hitter Adrian Del Castillo to seal the win and earn his first save with the Padres.

The first start for Nestor Cortez in a Padres uniform started much like fellow newcomer JP Sears. Cortez allowed a run in each of the first two innings and worked through traffic, but he settled in and completed 4 2/3 innings and allowed two runs on 76 pitches.

Cortez struck out the first two batters of the bottom of the fifth inning, but then allowed walks to the next two hitters. He left the game in the fifth with two on and the Diamondbacks leading his Padres 2-0. Jason Adam came in to replace Cortez and struck out Geraldo Perdomo to get out of the inning and the jam.

The Padres could not mount any offense against Diamondbacks pitching prior to their ninth inning rally, but in the top of the seventh inning, they were able to plate a run thanks to a one-out solo home run by Bogaerts. It was his second home run of the series and pulled San Diego within a run, making the score, 2-1.

The Padres had a potential scoring opportunity in the top of the fifth inning, trailing 2-0. San Diego had runners at first and third with two outs and the Padres attempted a double steal. Cronenworth was trying to score from third, but was thrown out at the plate after James McCann threw toward second, the throw was cut by Perdomo at short and he threw back to McCann in time to get Cronenworth before he crossed the plate.

While the Padres offense struggled, the defense was good and was highlighted by a double play in the bottom of the seventh inning. Laureano raced into the left-center field gap where he caught a fly ball. He then threw the ball toward third and hit cutoff man Iglesias. He made a quick throw to Manny Machado at third base and he applied the tag to the Arizona runner just before he got to the bag.

The Padres are off Thursday, but return home and return to action against the Boston Red Sox, Friday at 6:40 p.m.