ATLANTA - Matt Cain snapped his three-game losing streak with five-hit ball over eight innings, and the San Francisco Giants barely avoided another loss to Atlanta in the final at-bat, holding on for a 7-5 victory over the Braves on Wednesday night.
The Giants broke it open with four runs in the fourth, one of them driven in by Cain (10-9) on a sacrifice fly. But he did his best work on the mound, striking out nine and giving up only an unearned run in the first on Chipper Jones' bases-loaded walk.
After Cain left, the Braves scored four runs in the ninth and had the tying run at the plate. But Brian McCann struck out swinging against Jeremy Affeldt.
San Francisco pounded All-Star Jair Jurrjens (12-5), taking advantage of a pitcher who wasn't sharp in his first start coming off the disabled list. He surrendered eight hits and five runs in six innings.
The Braves won the first two games of the series, rallying for three runs in the ninth for a 5-4 victory Monday, then pulling out a 2-1 win in 11 innings on Tuesday. They nearly did it again, closing to 7-5 on Martin Prado's two-run double after Giants shortstop Orlando Cabrera dropped Michael Bourn's soft blooper behind the mound to extend the inning.
But Affeldt got McCann to end it.
Once the Giants pushed their margin above three runs, Atlanta was in big trouble. San Francisco improved to 32-0 when leading by at least three runs, the majors' only undefeated team in those situations.
The win came at a good time for the struggling Giants, who've been plagued by injuries and were knocked out of first in the NL West with a stretch of only five wins in 18 games. They closed to 2½ games behind Arizona in the division race and with five games of wild card-leading Atlanta.
The Giants broke open a 1-all game in the fourth. Aubrey Huff led off with a double, Nate Schierholtz singled and Cabrera brought home the go-ahead run with the third hit in a row. Brandon Belt walked to load the bases, and Eli Whiteside pushed the lead to 3-1 with another run-scoring single.
Back-to-back drives to the warning track made it 5-1. Cain hit a sacrifice fly to deep center, and Cody Ross followed with a liner that was caught in front of the left-field wall, allowing Belt to trot home.
Jurrjens wasn't exactly fooling the Giants even when his teammates caught the ball. Schierholtz hit one to the track in right that was hauled in by Jose Constanza.
San Francisco closer Brian Wilson wasn't available to pitch after flying to Florida to have his ailing right elbow checked out. It's nothing serious, but manager Bruce Bochy decided to give Wilson a second night off to rest his arm.
The way Cain pitched, Wilson wasn't needed.
San Francisco jumped ahead in the first on back-to-back doubles by Mike Fontenot and Pablo Sandoval. The Braves tied it up in the bottom half, taking advantage of a miscue by Sandoval at third base.
With two runners on and one out, Sandoval fielded Dan Uggla's grounder and attempted to tag Bourn running toward third. But Bourn dodged the glove, and Sandoval's throw to first was too late to get Uggla, either.
Cain struck out Freddie Freeman with the bases loaded, but Jones walked to bring home the tying run.
Jurrjens was pitching for the first time since Aug. 1, having gone on the disabled list because of a strained right knee. He hasn't been the same dominating pitcher he was before making the All-Star team, giving up at least four runs for the fourth time in his last five starts. That happened only once in his first 16 appearances.
The Giants added to their lead in the ninth with two more sacrifice flies off Scott Linebrink. Sandoval picked up his second RBI and Huff brought home the other run.