PHOENIX -- The Arizona Diamondbacks may have found the formula to win the hotly contested NL West: Beat up everyone in the division.
The Diamondbacks pulled even with second-place Los Angeles with the win and moved within a half-game of San Diego for the division lead. They also improved to 25-18 against the West, the best record in the division. Arizona is 33-38 against everyone else but with 32 of their final 48 games against division rivals, the club is feeling good about returning to the postseason for the first time since 2002.
"We can kind of control our own destiny now that we're playing our own division," said Gonzalez, whose two-run homer put the Diamondbacks ahead to stay in the fifth inning. "The good thing for us is we've got two different chances to get in there. We've just got to continue doing little things."
The Diamondbacks also are only a game behind Cincinnati in the NL wild-card race.
Miguel Batista (10-5) earned the victory despite giving up 12 hits in six innings. He allowed two runs, walked one and struck out one.
Batista hasn't lost since June 20, a span of nine starts. He pitched from the stretch most of the night, beginning in the first inning, when he gave up singles to the first two hitters. He avoided big innings with the help of his fielders, who turned four double plays behind him.
Moises Alou ended threats in the first and fifth innings by grounding into 5-4-3 double plays. Pedro Feliz and Eliezer Alfonzo also bounced into double plays against Batista.
"A groundball here, a groundball there," said Batista, who is 1-2 with a 7.17 ERA against the Giants this year.
Arizona, which leads the National League with 130 double plays, also doubled up Hillenbrand on a grounder induced by Brandon Lyon in the eighth.
"We like to think we're pretty good defensively," Arizona manager Bob Melvin said.
The slow-footed Giants also lead the league in grounding into double plays with 112. Before the game, San Francisco manager Felipe Alou lamented his team's inability to stay out of double plays.
After Randy Winn and Omar Vizquel singled with no outs in the first, Steve Finley flied out and Alou watched in dismay as his son, Moises, banged into an inning-ending double play.
"I hit-and-run with the first guy that got on, and even in that inning we hit into a double play to begin the festivities," Felipe Alou said.
Chad Tracy had three hits for Arizona.
Matt Morris (8-10) allowed three runs, seven hits and a walk in five innings for the Giants. He struck out one and, unlike Batista, couldn't come up with the big pitch when he needed it.
With the game tied at 1 and a runner at second base in the fifth, Morris had Gonzalez down 0-2 with two outs. But Gonzalez worked the count full and hit the 3-2 pitch over the 25-foot center-field wall for his 12th homer of the season.
The drive scored Batista, a .128 hitter who doubled to lead off the inning.
"I'm battling Gonzo and I"m trying to do anything I can not to let the run score," Morris said. "I get to two outs, 0-2 count, keep battling. I just don't want him to flip it somewhere and I end up making a mistake late in the count. Cost me the game."
Jorge Julio pitched the ninth for his 15th save in 18 chances.
- Arizona 2B Orlando Hudson's first-inning single extended his hitting streak to 10 games.
- Batista's fifth-inning double was the fifth of his career and first since Aug. 7, 2003.
- Arizona rookie OF Carlos Quentin's double in the sixth inning was his 14th hit since he was promoted from Triple-A Tucson on July 20. Quentin has five doubles, five singles and four home runs. Quentin also robbed Vizquel of extra bases by climbing the right-field fence in the seventh.
- Arizona CF Eric Byrnes led off the first with a single for his 500th career hit. Byrnes also stole a base and is 16-for-17 in steal attempts.
- San Francisco went 3-for-18 with runners in scoring position Wednesday night.