PHOENIX (AP) — Pinch-hitter Pavin Smith connected for a two-run homer in the bottom of the ninth inning to lift the Arizona Diamondbacks over the San Francisco Giants 4-2 on Monday night.

Jake McCarthy got the winning rally started with a looping, one-out double down the left field line. Then Smith — hitting for Eugenio Suárez — smashed a pitch from Randy Rodríguez (1-1) that barely cleared the yellow line above the wall in center.

The D-backs have won three straight while the Giants have dropped a season-high five in a row.

Lourdes Gurriel Jr. gave the D-backs a 1-0 lead in the second with a homer off Spencer Howard, which was also the 100th long ball of his career. Blaze Alexander’s RBI single up the middle later in the inning scored Suárez — who reached on a triple off the wall in right-center — for a 2-0 advantage.

San Francisco’s Matt Chapman hit a double in the fourth that drove in Brett Wisely, cutting the lead to 2-1. Heliot Ramos tied it at 2 in the seventh with a solo shot to the deepest part of the park in right-center.

The Giants threatened in the ninth, putting runners on first and third with two outs. Jorge Soler hit a bouncing ball down the third base line to Suárez, who fired high to first base, but Christian Walker was able to leap into the air and grab the throw before tagging Soler just before he crossed the base.

That set the stage for Smith, who hit just his second homer of the season.

Diamondbacks right-hander Ryne Nelson gave up two runs over 7 2/3 innings, which was the longest outing of his career. He yielded six hits and struck out one.

Nelson came into the game with a 6.02 ERA but coaxed lots of early contact from the Giants, needing just 80 pitches to navigate through his outing.

Ryan Thompson (3-2) earned the win after 1 1/3 scoreless innings.

Erik Miller was the opener for the Giants and pitched a scoreless first inning. Howard came into the game in the second and threw 4 2/3 innings, giving up two runs and four hits.

TRAINER’S ROOM

Giants: LHP Blake Snell (left groin strain) was placed on the 15-day injured list. The two-time Cy Young Award winner left Sunday’s game against the Yankees in the fifth inning after feeling discomfort. OF Michael Conforto (hamstring) was activated to take Snell’s spot.

Diamondbacks: SS Geraldo Perdomo (knee) is expected to begin a rehab assignment in Triple-A Reno on Wednesday.

UP NEXT

The D-backs will start rookie LHP Blake Walston (0-0, 2.16 ERA) on Tuesday in the second game of the series. The Giants will counter with LHP Kyle Harrison (4-2, 4.15 ERA).

___

AP MLB: https://apnews.com/hub/mlb