PHOENIX -- Doug Davis finally got something to show for a good outing.
Davis, who had allowed just two earned runs in his previous three starts but left each with a no-decision, scattered nine hits, giving up two runs in 6 1/3 innings. It was his first victory since beating San Diego 8-0 on June 5. Davis (4-8) was 0-2 in five starts since then.
"Obviously the year has been a little sloppy, so coming out and winning four in a row, it's a good sign," Davis said. "It looks like we're being more aggressive and starting to care a little bit more and taking pride in this game."
Arizona hasn't lost since third baseman Mark Reynolds criticized his teammates' desire and effort after a bumbling loss at Colorado on Friday night.
The Diamondbacks clinched a home series victory for the first time since manager Bob Melvin was fired and replaced by A.J. Hinch on May 8. Arizona has three series wins at home all season.
If the Diamondbacks beat San Diego on Wednesday to complete their first three-game sweep of the year, they will move ahead of the Padres and out of last place in the NL West.
"We're playing better baseball collectively," said Hinch, whose team has won back-to-back series for just the second time this season. "We're playing with a little spirit. We've got a little bounce in our step."
As a lefty starter whose contract expires after this season, Davis knows he's a strong candidate to be traded.
"It's in the back of my mind, but then again I hope it's in their minds that I'd like to stay here for more than one year, more than two years, maybe a three- or four-year extension," he said.
Davis said that even if he is traded, he might like to re-sign with Arizona after this season.
Kevin Kouzmanoff was 3 for 4 with two doubles for the Padres, who have lost six of seven.
Kevin Correia (5-7) allowed four runs, three earned, and six hits in six innings.
The Padres came within inches of tying the game when Kouzmanoff doubled off reliever Jon Rauch in the eighth, then Chase Headley hit one off the top of the fence in right field. The ball bounced back in play and Headley had to settle for an RBI double that cut the lead to 4-3.
"If he had hit it another inch, I imagine it would have been a home run," Hinch said. "That's a home-field advantage. We got a break our way, which was much needed in that spot."
Padres manager Bud Black spoke with first-base umpire Joe West, but said after the game he thought the call was right.
Chad Qualls pitched a perfect ninth for his 16th save.
Three San Diego errors, two by Correia on the same play, helped the Diamondbacks score twice in the third to take a 2-1 lead.
Chris Young doubled with one out, then Davis put down a sacrifice bunt. Correia fumbled the ball, then threw wildly past first, allowing Young to score and Davis to advance to second. Felipe Lopez's sacrifice bunt moved Davis to third.
"I guess it bounced under my glove. I should have had it, and then I compounded the problem by throwing it away," Correia said. "I didn't know how much time I had and rushed it. It pretty much cost us the game."
Stephen Drew grounded to second, but Edgar Gonzalez bounced his throw home and catcher Eliezer Alfonzo couldn't come up with it as Davis scored the go-ahead run.
The Diamondbacks scored two more in the fourth. Miguel Montero led off with a single, then scored when Gerardo Parra tripled to right-center. Chad Tracy's RBI sacrifice fly made it 4-1.
Arizona RHP Tom Gordon, on the DL since May 4 with a strained left hamstring, threw batting practice on Tuesday. ... Parra is tied for the major league lead with six triples. ... Davis picked off two runners at first. ... Headley went 2 for 3 and has six hits in his last 10 at-bats.