SAN FRANCISCO (AP) Tim Hudson enjoyed beating his old team, more for bragging rights than anything else. He was happier about bouncing back from a bad outing.
Buster Posey hit a two-run homer in the first inning and drove in three, Hudson pitched seven strong innings and the San Francisco Giants won their fifth straight, beating the Atlanta Braves 4-2 Friday night.
''It's nice to beat anybody in this league,'' Hudson said. ''It's cool facing those guys, but at the same time it was a nice rebound game for me. That last start left a sour taste. I felt physically better than I did then.''
Hudson (3-4) gave up one run on five hits, striking out four and not walking a batter as he beat his 29th major league team. That left the Oakland Athletics, his first team, as the only one he has not beaten.
He had yielded eight runs in 3 2/3 innings of a loss to Colorado on Sunday.
Mike Foltynewicz (3-2) was nearly as effective, retiring 11 in a row at one point. He gave up the two runs on five hits, walking one and striking out a career-high eight.
''The first inning I wasn't really comfortable,'' Foltynewicz said. ''After that I got into a groove. I couldn't get a bunt down and that was upsetting, so I was a little more aggressive on the mound.''
Freddie Freeman blasted his sixth homer of the season, a solo shot that easily cleared the center field fence in the ninth.
Posey added a ground-rule double in the eighth, scoring Joe Panik, who walked and stole second. Brandon Crawford, who had two hits, also singled in a run as the Giants moved into first place for the first time since opening day.
Hudson retired 13 of the final 14 batters he faced. He got 14 outs on grounders and struck out four.
''I thought he got better as the game went on,'' Posey said. ''He moved his sinker around and was really efficient.''
Hunter Strickland pitched the eighth and Santiago Casilla got the final three outs for his 15th save in 17 chances, despite walking two.
Cameron Maybin had two hits and drove in a run for the Braves, who lost their fourth in five games. Andrelton Simmons also recorded a pair of hits and scored a run.
Giants pitchers went 39 consecutive scoreless innings at home before Maybin's third-inning single, matching a franchise record.
The Giants improved to 21-7 in May, matching their best record in any month since August of 1968. The franchise record is 24 wins in June of 1954.
When cameras zoomed in on NBA MVP Stephen Curry, sitting in the front row with his wife and Giants' president Larry Baer, the sellout crowd went into a frenzy, giving him a loud, sustained standing ovation, which included chants of ''MVP! MVP!'' Curry was wearing a San Francisco jacket and cap.
''It was cool,'' Posey said. ''You could tell there was extra electricity in the air. Everybody was excited he was here. I got to speak with him briefly before the game.''
Braves: OF Joey Terdoslavich (left wrist sprain) was 1 for 4 with an RBI in his first rehab game with Double-A Carolina. The Mud Cats beat Myrtle Beach, 2-0.
Giants: RHP Jake Peavy (back strain) and the Giants have decided to slow down his rehab assignment following his subpar outing Wednesday night.
Braves: RHP Williams Perez (0-0, 4.05) will make his third start Saturday night, facing the Giants for the first time. He's excelled in his first two starts, both no-decisions. He's allowed two runs in 11 innings on 13 hits, walking two and striking out 14.
Giants: RHP Tim Lincecum (5-2, 2.56) looks to continue his strong start to the season. He did allow three home runs in a victory over the Milwaukee Brewers in his last start. He's 9-6 with a 2.76 ERA in 15 starts against the Braves, beating them twice last year.