SAN FRANCISCO -- As his career nears its end, Tim Hudson wants to soak in the big moments, like walking off the mound to a thunderous applause after getting out of a tough inning.
Hudson had one to savor Sunday, pitching six scoreless innings and benefiting from Buster Posey's three-run homer in helping the San Francisco Giants avoid a sweep and end a six-game home losing streak to Arizona, beating the Diamondbacks 5-1 on Sunday.
"There are great fans here in San Francisco and I do want to take in every little moment I can out there," the 40-year-old Hudson said. "I can't argue with results."
Alejandro De Aza and Jarrett Parker also drove in runs for the Giants, who snapped a 35-inning scoreless streak at home against Arizona pitching.
Hudson (8-8) gave up four hits in improving to 11-2 with a 2.19 ERA in 16 starts against the Diamondbacks. He walked three and struck out three. Hudson won his third consecutive decision and has a 2.10 ERA over his past four starts. He also earned career win No. 222.
It was still a scoreless tie when Hudson sat down next to Posey after the top of the sixth.
"It was funny," Hudson said. "I said `Come on boys, let's get four,' without really thinking we would get four. Sometimes you just have to ask for it."
Santiago Casilla gave up Peralta's 16th home run of the season with one out in the ninth.
Jeremy Hellickson (9-10) took a one-hitter into the sixth before giving up a single to Angel Pagan and a run-scoring double to De Aza. Arizona pitchers had an overall 27-inning scoreless streak end. It was the second longest run in franchise history behind a 31-inning streak in July of 2002.
"I walk away a little disappointed," Hellickson said. "My command was pretty good, even in sixth inning I executed my pitches. Good pitches, maybe not the right pitch for the situation."
"Special players do special things," Hudson said.
The Diamondbacks won eight of the 10 games they played at AT&T Park this year and their pitchers compiled an ERA of 1.68.
Diamondbacks: RHP Chase Anderson, who has appeared in two games in September, will return to the starting rotation on Wednesday against the Dodgers in Los Angeles. He's replacing Rubby De La Rosa, who has struggled against the Dodgers. Anderson is 6-6 with a 4.52 ERA.
Giants: C Andrew Susac underwent successful wrist surgery and should be at full strength in spring training. ... OF Hunter Pence has not been able to hit off a batting tee and will likely not make it back into the lineup this season.
Diamondbacks: RHP Jhoulys Chacin (0-1, 2.95) starts Monday night's series opener at the Dodgers. Chacin is 4-3 with a 2.89 ERA at Dodger Stadium.
Giants: Following an off day, RHP Chris Heston (11-10, 3.61) starts against the Padres in San Diego on Tuesday. He's 0-5 with a 5.03 ERA in his last eight starts.