SAN FRANCISCO (AP) — Matt Chapman hit a two-run homer in the bottom of the ninth inning and the San Francisco Giants beat the Braves 3-2 on Saturday, handing the Braves their sixth consecutive loss.

Heliot Ramos singled with one out against Braves reliever Pierce Johnson (1-3). After Wilmer Flores popped out, Chapman homered to left for his 12th of the season.

It spoiled a stellar start by Braves starting pitcher Bryce Elder, who allowed a run and three hits while striking out 12 in eight innings.

Giants starter Logan Webb gave up two runs and six hits in six innings while striking out 10 — his fourth double-digit effort of the season.

Tyler Rogers (3-2) pitched a scoreless ninth to get the win.

Flores had a solo homer to give the Giants a 1-0 lead in the fourth, and the Braves’ Michael Harris went deep to tie the score in the fifth. Harris’ shot came one pitch after Braves manager Brian Snitker was ejected for arguing balls and strikes.

The Braves took a 2-1 lead in the sixth when Marcell Ozuna beat out a potential double play with the bases loaded and one out as Ronald Acuña Jr. scored the go-ahead run.

Key moment

With the Giants down to their final out, Chapman squared up an 88 mile-per-hour curveball from Johnson on a 1-1 count in the middle of the strike zone to give San Francisco its second consecutive walk-off win over the Braves.

Key stat

The Giants played in their fifth consecutive one-run game and won their fourth in a row.

Up next

Giants RHP Landen Roupp (3-4, 3.18 ERA) will start the series finale against Braves RHP Spencer Strider (0-4, 5.68).