Arizona's Emmanuel Rivera had an RBI single among his two hits and scored a run.
Evan Longoria also had an RBI single for the Diamondbacks, who won two of the three games in the series after losing four of their previous five contests.
Padres 5, Cubs 3Fernando Tatis Jr. ripped a two-run single in the seventh inning to give San Diego the lead for good in its win in Chicago.
Tatis added an insurance run with an RBI single in the ninth.
Rodolfo Castro added a two-run single, and Bryan Reynolds, Andrew McCutchen and Ji Hwan Bae each had an RBI single for the Pirates.