SAN DIEGO -- Tim Stauffer's luck changed at the right time.
Stauffer shut down Arizona into the seventh inning before leaving with arm stiffness and the last-place San Diego Padres beat the NL West-leading Diamondbacks 2-0 on Friday night.
The Diamondbacks' lead over the defending World Series champion San Francisco Giants was trimmed to six games with 11 to play. The Giants won 9-1 at Colorado. It was just the fourth time the Diamondbacks have been shut out this season, a major league low.
"We really don't want them to celebrate on our field," said closer Heath Bell, who pitched a perfect ninth for his 38th save in 43 chances.
Arizona had won 18 of 22 since Aug. 23, and had beaten the Padres nine times in their previous 11 meetings. San Diego had lost 17 of 20 coming in. Each team had just five hits at spacious Petco Park.
Stauffer (9-12) won for the first time in five starts by holding Arizona to four hits in 6 2/3 innings. He struck out six and walked none.
Manager Bud Black and a trainer came out to check on Stauffer after he got Aaron Hill to fly out to center. The right-hander then came out of the game.
"It was nothing that prevented me from pitching," Stauffer said. "I felt it early on. I put a little extra stress on my arm because for some reason it was coming out a little better. I was able to let it go."
Stauffer was coming off a no-decision in the Padres' 6-5 loss in 10 innings at Arizona last Saturday, when Bell allowed two homers in the ninth and Joe Thatcher walked in the winning run in the 10th.
He was strong from the start in this one, striking out five in the first two innings.
Stauffer and three relievers combined for a five-hitter for San Diego's seventh shutout this year. By comparison, the Padres tied the franchise record with 20 shutouts in 2010.
"You could tell his ball had a lot of life," manager Bud Black said. "His fastball had good movement, good life on his slider and good arm action on the changeup."
The Padres gave Stauffer all the support he needed by scoring two runs on three straight hits off rookie lefty Wade Miley (3-2) with one out in the first. Jason Bartlett singled, advanced on a wild pitch and scored on Jesus Guzman's single to left-center. Nick Hundley doubled to move Guzman to third, and he scored after Gerardo Parra booted the ball in the left-field corner.
Miley (3-2) allowed two runs and five hits in six innings.
Black said 3B James Darnell is likely out for the rest of the season after suffering a subluxation of his left shoulder after making a diving stop of Justin Upton's single leading off the seventh. ... San Diego 3B Chase Headley, on the disabled list since early August with a broken finger, is going to instructional camp in Arizona to get some at-bats. ... RHP Josh Collmenter (9-9, 3.40 ERA), who took a 7-6 loss to the Padres on Sunday, starts Saturday night's game against San Diego LHP Wade LeBlanc (3-5, 5.43 ERA). LeBlanc was the winner on Sunday. He's allowed four earned runs in each of his last four starts after allowing three or fewer runs in his first seven starts with the Padres this year.