PHOENIX -- A.J. Pollock had three singles and an RBI and Brandon McCarthy won his second consecutive start as Arizona scored five runs in the seventh inning for a 5-2 victory over San Diego on Friday night.
The Diamondbacks (27-21) had doubles by Miguel Montero, Martin Prado, Wil Nieves and Paul Goldschmidt in the seventh inning after being shut out on two singles by left-hander Eric Stults (4-4) through six.
McCarthy (2-3) gave up one run and five hits in seven innings and was the beneficiary of the big seventh inning, leaving for a pinch-hitter when the score was tied at 1. McCarthy has given up one run in his last 24 innings, dropping his ERA to a season-low 4.36.
San Diego left fielder Carlos Quentin had three hits, including two doubles, and scored a run.
Padres shortstop Everth Cabrera had two hits and led off the eighth with his third home run of the season for the final run of the game. The Padres are 22-25.
Heath Bell pitched the ninth for his seventh save.
Montero, who had six hits in his last 46 at-bats, hit a ground-rule double into the Padres' bullpen to open the seventh and scored on Martin Prado's double inside the bat at first, tying the score at 1. Prado had been 4 for 42 with runners in scoring position.
Nieves batted for McCarthy and doubled off the fence in left-center field to make it 2-1 after a groundout and a walk, knocking out Stults. Pollock singled to left field on the only pitch by reliever Dale Thayer to make it 3-1.
After reliever Joe Thatcher threw out Nieves at the plate on Didi Gregorius' bunt, reliever Anthony Bass gave up a two-run double to Goldschmidt to make it 5-1.
Pollock had the only two hits off Stults in the first six innings, singling in the third and sixth. He has eight hits in his last 14 at-bats.
Quentin, back in the lineup after missing two straight games with left knee soreness, doubled into the left-field corner to lead off the second and scored on Yonder Alonso's single to left center. Quentin began his career with the Diamondbacks after being a first-round draft pick in 2003.
McCarthy had a career-high 18-inning scoreless streak snapped in the second. He threw a three-hit shutout at Miami last Saturday after pitching eight scoreless innings in a no-decision against Philadelphia in a no-decision May 12.
NOTES: San Diego recalled LHP Tommy Layne from Triple-A Tucson and optioned RHP Burch Smith to Tucson on Friday. Smith gave up four runs in one-plus innings of a 5-3 loss against St. Louis on Wednesday. LHP Clayton Richard is expected to fill that spot the next turn through the rotation. Richard threw a bullpen session at Chase Field on Friday afternoon and is on track to be activated from the disabled list for a start early next week, manager Bud Black said. Richard has been on the disabled list since May 5. with an intestinal virus ... The D-backs plan to send the films of the latest MRI on OF Adam Eaton (left ulnar collateral ligament) to elbow specialist Dr. James Andrews for a second look, FOXSportsArizona.com reported. Eaton, expected to be the D-backs' starting center fielder before suffering his injury late in spring training, was shut down after feeling elbow soreness on a rehab assignment at Class A Visalia on Monday. ... San Diego had won 13 of the last 21 games in the series and eight of the last 10 at Chase Field, entering the weekend series.