Updated

The last time the Giants needed a win over the Diamondbacks, starter Ryan Vogelsong delivered.

The All-Star has struggled a bit since that victory, but will try to come through this afternoon when San Francisco and Arizona wrap up their big three- game series at AT&T Park.

In danger of getting swept at home by the Diamondbacks at the start of August, Vogelsong came through with six solid innings of one-run ball to help his club roll to an 8-1 win. However, he has lost four of five starts since and will try to avoid a fourth losing start in a row this afternoon.

One of baseball's biggest surprise stories of the year, the right-hander was touched for three runs over five innings of a loss to the Cubs on Tuesday in his most recent outing. That dropped Vogelsong to 10-5 with a 2.63 earned run average on the season.

The 34-year-old has a 2.18 ERA in 14 outings at home in 2011 and gets a chance to pitch the Giants to a series victory tonight. San Francisco took Friday's opener to pull within five games of first-place Arizona in the National League West standings, but gave the game right back with last night's 7-2 defeat.

Arizona's Ian Kennedy outdueled Tim Lincecum to notch his league-leading 18th win of the season. He gave up a run and struck out six over seven innings, while Paul Goldschmidt homered and drove in two runs one day after the Giants snapped the D-Backs' win streak at nine straight games.

"These guys are the [defending] world champions, they're a great team," Diamondbacks manager Kirk Gibson said of the Giants. "Their pitching is their strength. We know if we have aspirations to get into the postseason and go beyond, our pitching's going to have to stand up."

Arizona has now won four of its past six over San Francisco with one series remaining between the teams this season; a three-game series from Sept. 23-25 in the desert.

Lincecum lasted five-plus innings and was touched for five runs while falling to 12-12 on the year. He wasn't happy with his approach in the game, especially to Diamondbacks rookie Goldschmidt.

"I kind of got away from the game plan against a guy like Goldschmidt," Lincecum said. "He's the kind of guy you need to elevate the ball in on, and I just kept throwing it knee-high, where he can get to those kinds of balls."

Carlos Beltran, who went 4-for-4 and homered in Friday's win, added another three hits last night, and Pablo Sandoval drove in two runs for the Giants, who went 0-for-5 with runners in scoring position to lose for the fourth time in six games.

Getting the call in this rubber match for the Diamondbacks is Daniel Hudson, who takes aim at a third straight victory today after allowing only two earned runs over back-to-back wins.

The right-hander came within one out of his first career shutout in a start at Washington on Aug. 24 before his final two pitches were driven over the wall for homers. He then came back on Monday to fire seven scoreless innings and beat the Rockies, scattering three hits and three walks while striking out eight.

"I was fighting myself early on, trying to make too perfect of a pitch," said Hudson, who also contributed an RBI single while improving to 14-9 with a 3.61 ERA in 28 starts this year.

Hudson, 24, beat the Giants when he last faced them on Aug. 2 with eight innings of one-run ball, moving to 3-2 with a 2.86 ERA in five career starts against them.

He may not have to face San Francisco outfielder Pat Burrell, who left Saturday's game early due to a sore right foot.