Updated

The San Francisco Giants were able to get back into the win column their last time out and hope the trend continues Saturday in the third portion of a four-game series with the Atlanta Braves at AT&T Park.

In a battle between division leaders, the Giants, who are even with Arizona atop the NL West, handed the Braves an 8-2 loss Friday night behind eight superb innings from Matt Cain. Cain allowed two runs in eight innings, struck out seven and allowed a pair of walks to even his mark at 2-2.

"We needed a lot of length in the game tonight, and he did more than that. He gave us eight solid innings, and threw a terrific game for us," Giants manager Bruce Bochy said of his right-hander.

Angel Pagan clubbed a two-run homer and Marco Scutaro added two hits and a pair of RBI for the Giants, winners in eight of their last 11 games. Buster Posey, Hunter Pence, Brandon Belt and Cain each added an RBI in the win.

The Giants rebounded from Thursday's 6-3 loss and are 5-3 on a 10-game homestand. They have a 13-7 record as the host this season.

Madison Bumgarner draws the start for Bochy's club Saturday and he is winless (0-1) in his past four outings. Bumgarner didn't have his best stuff the last time out in a 6-2 loss versus Philadelphia on Monday and allowed five runs and eight hits -- both season highs -- in six innings.

Bumgarner fell to 3-1 in seven starts and owns a 2.31 ERA. The lefty is still searching for a win against the Braves and is 0-3 with a 4.30 ERA in four career starts.

A six-run fourth inning put a damper on Tim Hudson's night on Friday, as he was charged with all six runs and eight hits in 3 2/3 innings. Hudson dropped to 4-2 on the season, struck out four and walked one.

"It was a nightmare inning, obviously. I didn't make very good pitches to get the inning going, and then it seemed like when I needed a break here or there, some balls found some holes, they hit some balls that were tough plays, and we just had a hard time stopping the bleeding. A break didn't go our way, that's for sure," said Hudson.

Brian McCann hit a two-run homer to provide the offense for the NL East- leading Braves, who had won two in a row and four of five games. The Braves are 3-2 on a 10-game road trip and sit just one game ahead of hard-charging Washington, which has ripped off five straight wins.

Taking the mound for Atlanta Saturday will be Paul Maholm, who ended a personal three-game slide his last time out in a 7-4 win at Cincinnati. Maholm lasted 5 2/3 innings and was reached for two runs and four hits, improving to 4-3 in seven starts to go along with a 3.09 ERA.

Maholm, a left-hander, is 3-2 in five road starts and 2-2 with a 3.43 ERA in nine career starts against the Giants.

In other Atlanta news, outfielder Jason Heyward felt some soreness after his first rehab assignment with Triple-A Gwinnett on Thursday. He was kept out of the lineup on Friday and underwent an appendectomy last month. Heyward could be back with the big league club as soon as Monday.

The Braves and Giants split a four-game series in San Francisco last season.