PHOENIX -- Jason Schmidt credits his offense for his three-year winning streak against the Arizona Diamondbacks. On Monday night, Schmidt created some offense for himself.
Schmidt hit one of San Francisco's six home runs and pitched the Giants to a 8-4 victory over the Diamondbacks to win his 11th straight decision against Arizona.
"The biggest factor is we've had some tremendous games here," Schmidt said. "It could be the same against any other team in the division. We seem to win the ball games in spite of what I'm doing. It's the offense that's gotten me here, not necessarily the pitching."
Pedro Feliz homered twice and Ray Durham, Moises Alou and Shea Hillenbrand also homered for the Giants, who moved within 4½ games of San Diego in the NL West.
The Diamondbacks, who acquired starting pitcher Livan Hernandez from the Washington Nationals for two minor leaguers before the game, dropped to 2½ games behind the Padres.
Schmidt (9-7) scattered seven hits and allowed three runs over 6 2/3 innings. He walked two, struck out two and matched a franchise mark with three hit batters.
"He struggled but his great stuff got him out of trouble," said Giants manager Felipe Alou.
Schmidt is 11-0 with a 2.61 ERA in 15 starts against Arizona dating back to May 21, 2003.
Alou's two-run homer in the sixth inning off reliever Jeff Bajenaru (0-1) put the Giants ahead 4-3. After Bajenaru retired Barry Bonds on a high fly ball to left, Durham hit his 19th homer into the right-field stands to make it 5-3.
Feliz capped the Giants' four-run, three-homer inning with a line shot into the left-field bleachers off Bajenaru for a 6-3 lead.
Schmidt led off the seventh inning with his sixth career home run -- his second against the Diamondbacks -- to put San Francisco ahead 7-3.
"The ball hit my bat, that's all it was," Schmidt said. "Anytime I get a hit it's luck."
Hillenbrand made it 8-3 with a solo shot leading off the eighth.
The six home runs allowed matched a Diamondbacks' franchise record.
Chad Tracy was 2-for-2 with a walk and two RBI for the Diamondbacks and Luis Gonzalez hit his 535th career double to move into sole possession of 26th place on the career list. Arizona lost for the third time in four games to fall 2½ games behind the Padres.
Tracy left the game after colliding with Feliz while sliding head first into third base. He is day-to-day with back spasms.
"I hit his leg and I kept coming and the momentum sent my back in the wrong direction," Tracy said. "Right now I feel fine. I feel like I could go back out there and finish the game if I had to. We'll see in the morning. The initial contact, what I felt, I didn't know if I broke my back or what. It felt worse than anything I've ever felt before."
San Francisco took a 1-0 lead in the first on Bonds' RBI groundout.
The Diamondbacks answered in the bottom of the inning when Schmidt hit Eric Byrnes with a pitch and Gonzalez hit his league-leading 40th double to tie the game 1-1. Gonzalez scored on a single by Tracy to make it 2-1.
Tracy extended the lead to 3-1 in the third when he singled home Conor Jackson, who reached on a one-out double to center.
Feliz's leadoff homer in the fifth pulled the Giants within 3-2.
Bonds was 1-for-4 with an RBI and a strikeout before leaving as part of a double-switch in the bottom of the seventh.
Enrique Gonzalez, pitching on three days rest, allowed two runs on four hits over five innings. Melvin said Gonzalez was on a 100-pitch count and had reached 90 pitches through five innings.
"We felt like if we can get through the sixth, then we'd have three guys go seven, eight, nine," said Arizona manager Bob Melvin. "We never got through it."
- Schmidt has five career homers with the Giants, leaving him one short of Don Robinson's franchise mark for pitchers.
- Feliz has two multihomer games this season and seven in his career.
- Jackson was hit on the left forearm with a pitch in the bottom of the fifth and left the game after the inning ended. X-rays were negative and he's day-to-day.
- Bajenaru has allowed five home runs over his last two innings. He allowed two homers in his last appearance on Sept. 21 for the Chicago White Sox against Cleveland.
- Arizona RHP Brandon Webb played catch in the outfield before Monday's game and will throw in the bullpen on Tuesday. Barring any setbacks, he will make his scheduled start Friday against Florida.