Arizona, which scored 11 runs in the series opener and entered the series finale leading the major leagues in runs scored, managed just one run in the final two games against the Padres.
San Diego starter Clayton Richard (2-2) allowed one run on nine hits in 6 2/3 innings while striking out a season-high eight. He didn't issue a walk.
Left-hander Brad Hand followed with four strikeouts in 1 1/3 innings. Right-hander Brandon Maurer picked up his second save in as many nights with two strikeouts in a perfect ninth.
Padres pitchers had 14 strikeouts.
The Padres took a 1-0 lead three hitters into the first when Wil Myers hit a 431-foot homer to left-center off Arizona starter Patrick Corbin. The first baseman's fourth homer of the season extended his hitting streak to 11 games, which is one shy of his career-longest streak.
Arizona drew even in the second when Chris Iannetta doubled and scored on Nick Ahmed's one-out single to right.
A night after homering for the only run in the Padres' 1-0 win over Arizona, Aybar again came through again Thursday in the fifth.
With one out, second baseman Yangervis Solarte ended a 1-for-22 funk with a double past Diamondbacks third baseman Jake Lamb. Austin Hedges followed with a sharp single to center that forced Solarte to hold at third. Aybar then doubled just inside the left field foul line. Solarte scored and Hedges scored from third as the hit rolled into the corner.
Hedges upped the Padres lead to 4-1 with his third homer of the season in the seventh off reliever Randall Delgado. All three of Hedges' home runs have come in his past five games.
Corbin (1-3) gave up three runs on five hits with no walks and eight strikeouts in six innings to take the loss.
NOTES: Padres RHP Luis Perdomo will come off the disabled list Sunday to start against the Marlins in the finale of the Padres' six-game homestand. ... The JACK wines produced by Diamondbacks C Chris Iannetta will be featured at the prestigious Pebble Beach Food Wine event this weekend. ... Padres C Austin Hedges stayed in the game after accidentally getting struck in the head by Iannetta's left elbow as the Diamondbacks were scoring in the second. Hedges was fielding a wide throw from RF Hunter Renfroe on the play. ... Padres LHPs Clayton Richard and Brad Hand each struck out two Diamondbacks in the seventh. Chris Owings reached first on a throwing error on the third of the four strikeouts.