ATLANTA — Chase Headley hit a tying homer and Logan Forsythe drove in the go-ahead run in San Diego’s two-run eighth and the Padres beat Atlanta 4-3 on Friday night to spoil Braves rookie David Hale’s debut.

Hale pitched five scoreless innings and struck out nine, the most by a Braves pitcher in his first major league game.

Justin Upton and Brian McCann hit home runs off Ian Kennedy in the third inning to give the Braves a 3-0 lead.

The Padres scored two runs in the seventh and tied the game on Headley’s leadoff homer off Jordan Walden (4-3) in the eighth.

Walden walked Tommy Medica, who moved to second on a wild pitch and scored on Forsythe’s pinch-hit single to center field off Scott Downs.

Nick Vincent (5-3) had three strikeouts in the seventh. Luke Gregerson pitched a perfect eighth before Huston Street got the final three outs for his 30th save.

Kennedy didn’t allow a hit until Upton led off the third with his 25th homer to left field. Freddie Freeman walked and scored on McCann’s two-run homer, a high shot to right field.

Kennedy has allowed 25 homers, the second-highest total in the National League.

San Diego loaded the bases with no outs in the seventh on singles by Medica, Ronny Cedeno and Rene Rivera off Luis Ayala.

Medica scored on pinch-hitter Jesus Guzman’s infield single off Luis Avilan. After Will Venable’s grounder forced out Cedeno at the plate, Chris Denorfia’s fly ball to right field off David Carpenter drove in Rivera, cutting Atlanta’s lead to 3-2.