SAN FRANCISCO (AP) The way Jaime Garcia was pitching, Atlanta manager Brian Snitker didn't think twice about letting him hit in a key spot in the seventh inning.

Garcia made sure that move paid off.

Garcia pitched 6 2/3 innings and drove in the first run of the game with an RBI single to lead the Atlanta Braves to a 2-0 victory over the San Francisco Giants on Friday night.

''I was glad he left me in,'' Garcia said. ''It worked out. Their pitcher was doing a great job. He was pitching great. I just got a good fastball in the middle of the plate and was able to do some damage.''

Garcia (2-3) did just about everything to get the Braves off to a good start on their nine-game trip. He allowed four hits and two walks to earn his fourth straight win against the Giants and delivered in the biggest at-bat of the game in the seventh inning against Matt Cain (3-3).

With a runner on second and two outs in the seventh, San Francisco opted to intentionally walk No. 8 hitter Dansby Swanson to face Garcia. The move backfired when Garcia grounded a single to left field to score Tyler Flowers from second. Brandon Belt's throw from left field hit Flowers and rolled away, allowing Swanson to score on the throwing error to make it 2-0.

''I was prepared to let him stay out there,'' Snitker said. ''As long as he kept throwing up zeroes, let him keep pitching.''

Garcia was then replaced with two outs and a runner on first in the bottom half and Jose Ramirez retired pinch-hitter Mike Morse on a comebacker on his first pitch to get out of the inning.

Jim Johnson pitched the ninth for his 10th save in 13 chances, giving the Braves their first shutout of the season.

Cain was sharp, allowing just one earned run in seven innings but it wasn't enough to prevent a fourth straight loss for San Francisco because of a big hit by the opposing pitcher.

''It's definitely tough when a pitcher does that,'' Cain said. ''We're definitely working on what we do as a craft on the mound and as a hitter so, he did a good job.''

Neither team scored in the first six innings. Cain escaped a first-and-third, one-out jam in the fourth by inducing Flowers to hit a double-play grounder and then retired Matt Kemp with a runner on third to end the sixth inning.

The Giants got their first runner to third in the sixth when they loaded the bases. But Justin Ruggiano grounded out to end San Francisco's best threat in its fifth shutout loss of the year.

''Once again we're in this offensive struggle right now, six runs in four games,'' manager Bruce Bochy said. ''I thought we'd come home and gets some rips in tonight but it didn't happen.''

TRAINER'S ROOM

Braves: 3B Adonis Garcia (Achilles tendon strain) is expected to come off the DL next weekend in Cincinnati rather than earlier in the week in Anaheim.

Giants: INF Aaron Hill (right forearm strain) was activated from a rehab assignment after being sidelined since April 24. LHP Steven Okert was optioned to Triple-A Sacramento.

HIDDEN BALL

Braves second baseman Brandon Phillips tried to pull off a hidden ball trick in the sixth inning after an intentional walk to Buster Posey loaded the bases. Phillips walked back from a mound meeting with the ball and tagged Eduardo Nunez at second base . But it didn't matter because timeout had been called.

HOME COOKING

Despite the defeat, Cain had another strong start at home. He is 3-1 with a 1.21 ERA in five starts at AT&T Park. Cain is 0-2 with an 8.28 ERA in five road starts.

BACK ON THE BIKE

Giants ace LHP Madison Bumgarner (ribs, shoulder) is ready for the next step in his rehab after being sidelined since mid-April following a dirt bike accident in Colorado.

''Ride horses, dirt bike riding. We're getting back on them,'' Bochy joked. ''He's feeling better.''

Bochy said Bumgarner should be ready to start throwing off flat ground during this homestand in what he described as a ''big step'' in the recovery.

UP NEXT

The Braves will face a lefty starter for just the fourth time all season when they take on Ty Blach (2-2) in the middle game of the series. Mike Foltynewicz (3-4) starts for Atlanta.

---

More AP baseball: apnews.com/tag/MLBbaseball

Copyright 2017 by STATS. Any commercial use or distribution without the express written consent of STATS is strictly prohibited.