SAN DIEGO (AP) -- The Padres' Jhoulys Chacin is building quite a resume at Petco Park.
The San Diego right-hander threw eight scoreless innings and got an eighth-inning homer from Erick Aybar to beat the Arizona Diamondbacks, 1-0, on Wednesday night.
Aybar, who had pitched to a batter the night before, pulled Zack Greinke's 82 mph slider just fair down the right-field line for the game's lone run.
More from FoxSports
"I was looking for a good pitch," Aybar said. "It was slider in the middle of the plate and I swing."
Added Greinke: "I was trying to throw a borderline strike. I would have been happier with a ball than an inch or two over the plate, just not a very good pitch. You make a mistake, it's gonna get hit no matter what pitch it is, it just wasn't very good."
The first homer of the year from Aybar made a winner out Chacin (2-2). Chacin was masterful as he gave up three hits. He walked two and struck out five.
For Chacin, it was his second straight win at home over a Cy Young Award winner. Earlier this year he defeated the San Francisco Giants' Madison Bumgarner.
"Definitely you are more excited when you go against a Greinke or Bumgarner," Chacin said. "You just try to go inning-by-inning by them.
Brandon Maurer worked the ninth inning for his second save as the Padres snapped a five-game losing streak.
"(Chacin) was working both sides of the plate with his fastball, he had a good sinker and went to slider later on," Padres manager Andy Green said. "It took a lot for us to come out on top tonight against Greinke."
A.J. Pollack singled in the ninth, stole second and reached third with two outs. But Jake Lamb struck out.
Grienke (1-2) and Chacin were locked in a duel over the first seven innings as neither team placed a runner in scoring position.
The Padres pinned a loss on Greinke for only the second time in 10 career decisions against them.
Grienke, leaning on his slider, started the game by retiring the first eight batters he faced and nine of the opening 10. He allowed a two-out single to Chacin in the third, but he was stranded. After Wil Myers singled in the fourth, he was erased on Yangervis Solarte's double-play groundball.
"He knows how to pitch," said Aybar, who entered the game in a 0-for-16 skid. "Every day, when he is on the mound, you have to compete because you know he is going to compete."
Third baseman Lamb's error on a one-out Chacin grounder in the sixth opened a small crack for the Padres. But Greinke easily put away Travis Jankowski and Allen Cordoba.
Solarte drew Grenike's only walk in the seventh with one out, but never advanced.
Chacin, who got knocked around in his last outing, turned in a performance reminiscent of two starts back when he threw 6 2/3 innings of two-hit, scoreless ball again the San Francisco Giants. Like Greinke, Chacin was using his slider to keep the Diamondbacks at bay. His innings weren't quite as clean as Greinke as he allowed a walk in the first, a single in the second, third and fourth.
But just like Greinke -- until the eighth -- Chacin was keeping the opposing team off the scoreboard. With the help of Maurer, they snapped the Diamondbacks' three-game winning streak.
"Zack did exactly what he was supposed to do," Arizona manager Torey Lovullo said. "He gave us eight great innings, and unfortunately made a mistake and good hitters take advantage of mistakes, and you lose a game 1-0. That's frustrating in itself."
Diamondbacks: Bench coach Ron Gardenhire was released from the hospital after prostate surgery. There is no timetable for his return.
Padres: RHP Jarred Cosart (right hamstring strain) was placed on the 10-day disabled list. … RHP Luis Perdomo (shoulder) had another bullpen session and could rejoin the rotation and start on Sunday.
Diamondbacks: LHP Patrick Corbin (1-2, 2.81) has produced two consecutive quality starts, although he split the two decisions. Corbin is 3-3 with an 3.16 ERA lifetime against the Padres.
Padres: LHP Clayton Richard (1-2, 3.60) has worked at least six innings in all three of his starts and is making his 14th start lifetime against the Diamondbacks. Richard has won 8 of 11 decisions with a 3.97 ERA.