SAN FRANCISCO (AP) Rookie Kelby Tomlinson wasn't sure how to react when his grand slam was replayed on the stadium video board. Veteran Marlon Byrd reminded him to smile and take in the moment.
Tomlinson hit a slam for his first career home run and Byrd added a three-run shot, leading Madison Bumgarner and the San Francisco Giants over the Chicago Cubs 9-1 on Thursday.
''It was pretty crazy. Everybody got up and started clapping for me,'' Tomlinson said. ''I'd never experienced anything like that. It's pretty special.''
The win moved the Giants within 5 1/2 games of the Cubs for the second NL wild-card spot.
Bumgarner (16-6) struck out 12 in six innings, giving up one run and two hits. He won his fifth straight start and matched the Cubs' Jake Arrieta for most victories in the majors.
''I'm just going out there and competing,'' Bumgarner said. ''Things are just going our way right now. I don't look at the month, I look from start to start.''
Tomlinson homered off James Russell in the eighth and received a standing ovation from the sellout crowd when he took his position at second base in the ninth. Matt Duffy and Juan Perez also drove in runs for the Giants, who won their second straight but are 3-5 over their past eight games.
''You play in the yard and you never dream about getting a base hit,'' Tomlinson said. ''You dream about hitting a home run and hitting a grand slam. I don't hit many home runs, so that was great.''
The Cubs lost a road series for the first since being swept by St. Louis in late June. They had won or split their previous six road series.
Dan Haren (8-9) lasted 6 1-3 innings, his longest outing since going seven against Toronto on June 9, a span of 15 starts.
Haren gave up five runs and six hits. He walked three and struck out four.
''We got a run off Bumgarner, which is hard to do, and I just give it right back,'' Haren said. ''No one feels worse about it than me. I have to be better.''
Starlin Castro doubled home Anthony Rizzo in the second for Chicago. Bumgarner did not give up a hit after Castro's double, retiring 15 of the final 17 batters he faced.
Perez's second-inning double tied it and Duffy's third-inning single gave the Giants a 2-1 edge.
Byrd's second home run for the Giants, a line drive that just cleared the center field fence, was his fourth in 35 at-bats against Haren.
''He's 2 for 2 with three-run homers on my days,'' Bumgarner said. ''He's been great to have around.''
Cubs: OF Dexter Fowler was out of the starting lineup for a second straight day because of a left shin contusion from fouling a ball off his leg. ... Kyle Schwarber was behind the plate for the first time since Aug. 6 with catcher David Ross on the family emergency leave list.
Giants: SS Brandon Crawford was out of the starting lineup a second straight day with tightness in his left side.
Cubs: RHP Jason Hammel (7-5, 3.35) opens the series against the Dodgers in Los Angeles on Friday night. He's 2-4 with a 4.96 ERA in 11 starts against them.
Giants: RHP Mike Leake (9-6, 3.44) will start Friday night's series opener at home against St. Louis. He's 1-1 with a 1.13 ERA against the Cardinals this season.