PHOENIX — Zack Godley followed one of his worst outings of the season with perhaps his best. Perfect timing for Arizona, too.
Godley pitched six effective innings in his 10th win, helping the Diamondbacks beat the San Diego Padres 3-1 on Friday night.
Arizona improved to 2-6 on its 10-game homestand and regained sole possession of first place in the NL West from the Los Angeles Dodgers, who lost 3-2 to the Angels.
Godley (10-6) allowed one run and four hits while improving to 5-1 in his last six starts. He was rocked for seven runs in four innings in a loss to San Francisco in his last outing.
"The way this game works you kind of have to let it go and move on," Godley said. "Baseball is a short-memory sport."
Asked what was working, he said: "my curve and my defense."
Diamondbacks manager Torey Lovullo said Godley's command was "as good as I can remember."
"There's been a couple of games so far this year where he has had outings like that," Lovullo said. "But today's was one of the better ones that I've seen in a long time."
Steven Souza Jr. drove in two runs with a single and fielder's choice in his second game back from the disabled list. Souza has played in just 17 games this season due to a right pectoral injury.
Joey Lucchesi (4-4) retired 14 in a row before Arizona scored twice in the sixth. Lucchesi went 5 1/3 innings, allowing two runs and three hits with two strikeouts, one walk and two hit batters.
He grazed A.J. Pollock with a pitch with the bases loaded to bring in the tying run.
Nick Ahmed doubled, singled and scored twice for the Diamondbacks. Brad Boxberger threw a perfect ninth for his 21st save in 25 tries.
The Padres have lost 14 of 18.
Lucchesi's first big league hit helped the Padres take the lead in the third. The rookie singled to left, advanced to third on Travis Jankowski's long single to the right-field corner and scored when Carlos Asuaji grounded out.
The Diamondbacks threatened in the first when David Peralta was hit by a pitch and Paul Goldschmidt lashed a ground-rule double that bounced into the Arizona bullpen. But they came up empty when Pollock grounded out and Souza struck out looking.
Arizona didn't get another baserunner until Godley drew a leadoff walk in the sixth. The Diamondbacks loaded the bases with one-out singles by Ahmed and Goldschmidt and Lucchesi hit Pollock to bring in the tying run.
That was it for Lucchesi. Reliever Adam Cimber bobbled Souza's slow grounder and still got the out at first, but Ahmed scored and the Diamondbacks led 2-1.
"He threw the ball well," Padres manager Andy Green said of Lucchesi. "We didn't do too much for him offensively. You get to that sixth inning, his pitch count is low. You want to see him attack that inning. The thing that hurts him is the walk to Godley. Outside of that I think it was a very good day for him."
Ahmed led off the eighth with a double and scored on Souza's two-out single.
Padres: RHP Phil Hughes (right rhomboid strain) was reinstated from the 10-day disabled list and RHP Kirby Yates returned from paternity leave. RHPs Kazuhisa Makita and Robert Stock were optioned to Triple-A El Paso.
Diamondbacks: RHP Randall Delgado (strained left oblique) was reinstated from the 60-day DL. RHP Fernando Salas was designated for assignment.
California high school shortstop Matt McLain, Arizona's first-round pick and the 25th overall player taken in the draft, informed the Diamondbacks he will not sign with them and will instead enroll at UCLA. The Diamondbacks will get a compensatory pick, the 27th overall, next year.
Arizona LHP Robbie Ray (3-1. 4.89 ERA) makes his third start since returning from the disabled list and San Diego counters with RHP Tyler Ross (5-6, 3.89 ERA) on Saturday night in the third game of the four-game series.