Zac Gallen fans 11 as D-backs salvage finale vs. Giants

Zac Gallen struck out a season-best 11 in six innings and pinch hitter Pavin Smith slugged a three-run homer to help the Arizona Diamondbacks record an 8-2 victory over the San Francisco Giants on Wednesday night at Phoenix.

Gallen (14-6) gave up one run, two hits and two walks while winning his fifth consecutive decision.

Arizona (88-71) ended a three-game losing streak moved one percentage point behind the New York Mets (87-70) in the battle for the National League’s second and third wild-card spots. The Atlanta Braves (86-71) are one game out.

Geraldo Perdomo had two hits and a walk for the Diamondbacks. Christian Walker added two hits and two runs and Gabriel Moreno drove in two runs for Arizona, which salvaged the series finale after being outscored 17-3 in the first two games.

Heliot Ramos had two hits and an RBI for the Giants (79-80), who had a season-best five-game winning streak halted.

San Francisco’s Mason Black (1-5) gave up four runs and five hits over 2 2/3 innings. He walked five and struck out three.

The Diamondbacks turned the game into a rout in the eighth inning. Perdomo singled with one out against Spencer Bivens and Corbin Carroll walked. One out later, Smith sent a 1-1 changeup into the pool beyond the right-center fence to give Arizona a six-run edge.

San Francisco scored in the second inning on Tyler Fitzgerald’s RBI double before Arizona put up the next five runs.

Walker led off the bottom of the second with a double before Lourdes Gurriel Jr. had an RBI single to tie the score. Moreno delivered a run-scoring single and Carroll added a sacrifice fly later in the frame.

Arizona used Jake McCarthy’s infield single and three walks to boost the lead to 4-1 in the third. Black walked Moreno with the bases loaded to force in the run before being replaced by Sean Hjelle.

In the fourth, Ketel Marte, Joc Pederson and Walker stroked consecutive one-out singles to make it a four-run margin.

San Francisco’s Mike Yastrzemski led off the eighth inning with a double against Justin Martinez, and Ramos followed with an RBI hit inside the first base line. Ramos continued to second and beat the throw, but his leg came off the bag and Perdomo kept the tag on as Ramos was called out.

A.J. Puk entered and struck out the next two hitters to end the inning. He also recorded the first out of the ninth before Kevin Ginkel finished up.