ATLANTA (AP) Hunter Pence hit a tie-breaking three-run homer in the eighth inning and the Giants bounced back from a deflating loss with an 8-3 win over the Atlanta Braves on Tuesday night.

Braves starter Shelby Miller saw his frustrating winless streak extend to 14 starts when the Braves bullpen failed to protect a 3-2 lead in the eighth inning. Miller has a 3.14 ERA during the streak, which started after he lost a no-hitter with two outs in the ninth inning on May 17.

Jeremy Affeldt (1-2) picked up the win in relief of Jake Peavy, who gave up one run and five hits in six innings as he continues to pitch at a high level since returning from the disabled list. Peavy struck out a season-high eight and walked one while throwing a season-high 106 pitches on a 94-degree night. Peavy has a 2.63 ERA in six starts since recovering from back and hip injuries.

More from FoxSports

The Giants blew leads of 6-0, 7-5 in the ninth and 8-7 in the 12th against the Braves on Monday, but the late innings belonged to San Francisco on Tuesday. Pence's home run capped a four-run eighth after the Braves had built a 3-2 lead in the seventh. Gregor Blanco and Matt Duffy (four hits) led off with doubles, and after an intentional walk to Buster Posey, Pence homered off Dave Aardsma (0-1). Nori Aoki added a solo home run during a two-run ninth.

Braves pinch-hitter Pedro Ciriaco tied the game 2-2 in the seventh with an RBI single that scored Adonis Garcia. Markakis then knocked in Daniel Castro to give the Braves the lead and Miller a chance at an elusive win.

The Giants took a 2-1 lead in the sixth inning on Pence's bases-loaded groundout that scored Gregor Blanco. Miller escaped further damage by striking out Brandon Belt to end the inning.

Miller struggled through the first inning, but only gave up one run. After back-to-back singles, Posey drove in Blanco with a sacrifice fly to left field to give the Giants the early lead.

The Braves tied it in the third when Nick Markakis drove in Daniel Castro with a double to left field. Pence made a diving attempt on the ball, but the ball squirted out when he hit the ground, allowing Castro to score from second.

TRAINER'S ROOM

Giants: Giants manager Bruce Boche said injured All-Star second baseman Joe Panik has yet to have an MRI on his injured back. He returned to San Francisco on Tuesday and is on the 15-day disabled list.

Braves: First baseman Freddie Freeman (strained oblique) and right-hander Jason Frasor (right shoulder strain) were placed on the 15-day DL. Freeman missed 30 games earlier this season with a wrist injury. Shortstop Andrelton Simmons (bruised thumb) missed his second straight game and is hoping to return by the end of the week. First baseman Joey Terdoslavich and rookie right-hander Ryan Kelly were recalled from Triple-A Gwinnett.

UP NEXT

Giants: World Series MVP Madison Bumgarner (11-6, 3.39) will start for the Giants in their final matchup with the Braves of the 2015 regular season. Bumgarner is 4-0 with a 2.30 ERA in his last five starts against the Braves.

Braves: Rookie Williams Perez (4-1, 4.14) gets his second start against the Giants on Wednesday. He threw seven shutout innings, giving up four hits, in an 8-0 Braves win at San Francisco on May 30.