SAN FRANCISCO — David Dahl has squared up so many baseballs hard this season that went off the wall just short of clearing the fences.

He's not taking anything for granted now, especially when it comes to the Colorado centre fielder's chances of making his first All-Star team.

Dahl hit a go-ahead grand slam in the third and drove in a career-high five runs, leading the Rockies past the San Francisco Giants 6-3 on Wednesday for a winning series.

"My biggest thing is if you start thinking about it and then we've still got what 10-something games left (before the All-Star break) and then you struggle and you're thinking about it, it kind of does no good and it's like the first half goes to waste," Dahl said.

He connected off Jeff Samardzija for his second career grand slam, with the other coming last Sept. 10 against Arizona. It marked the first grand slam ever hit by a Rockies player in San Francisco.

Dahl added an RBI single in the seventh. He had a two-run shot in the series opener. The only other Rockies player to drive in five runs at San Francisco was DJ LeMahieu on June 28 last year.

"David's talented," manager Bud Black said. "I think this year he's really solidifying himself as a good big league player and days like today validate what you're seeing from David. I think it's great. I know that his motivation and his desire is to be the best player he can be, and he's working hard and what I like is he's doing it on both sides. He's doing it on defence, he's doing it on the bases, he's doing it at the plate."

The big swing in the series finale backed German Márquez (8-3), who immediately surrendered Pablo Sandoval's homer the next inning but won his second straight decision.

Márquez, who tossed a one-hitter at San Francisco on April 14, allowed three runs and seven hits, struck out two and walked two over five innings. Wade Davis finished for his 11th save in 13 opportunities.

Colorado loaded the bases in the third after Tony Wolters drew a leadoff walk, Márquez advanced him with a sacrifice, Garrett Hampson singled then Charlie Blackmon walked to bring up Dahl.

Wolters added a sacrifice fly in the fourth for a key insurance run.

Samardzija (4-7), who pitched seven scoreless innings at home against the Rockies in April, was tagged for five runs and three hits in five innings.

"You give up a two-run homer and we're fine there and the game's still going our way, but when it's four it's unfortunate," Samardzija said.

He struck out six after lefties Drew Pomeranz and Madison Bumgarner each struck out 11 batters the previous two games.

The Giants went ahead in the bottom of the first — just San Francisco's 20th and 21st runs in the initial inning all year — on Sandoval's double. It came after Mike Yastrzemski reached on an error by Márquez when the pitcher missed the catch covering first base.

San Francisco hadn't scored more than one run in the first inning since June 1 against the Orioles.

TRAINER'S ROOM

Giants: C Buster Posey grounded into a game-ending double play. He had been off most of the day following a night game and Stephen Vogt doubled among his two hits making the start in Posey's place. Posey had right hip surgery in late August last year and the Giants are taking a cautious approach to not overuse him. ... Sandoval played 3B in place of resting Evan Longoria, 7 for 38 (.184) over his past 12 games.

BELT LEADING OFF

Giants first baseman Brandon Belt led off for a second straight day and third time ever.

SPECIAL VISITOR

Broncos coach and former 49ers defensive co-ordinator Vic Fangio spent some time in the Rockies clubhouse before the series finale to visit with Black, his staff and the players.

"I've heard his name over the years as a great coach, a great defensive mind," Black said. "So it was fun for us this morning to get to know him and have him around and meet the guys, sort of blend football and baseball. The Broncos were in a couple weeks ago, a lot of their players."

CHI CHI'S CHANCE

Black said before the game Chi Chi Gonzalez (0-1), who took the loss Tuesday night in his first major league appearance since 2016, would make another start Sunday facing the Dodgers.

UP NEXT

RHP Peter Lambert (2-0, 5.85 ERA) pitches for a second straight start against the Dodgers as the Rockies return home for a four-game series against the Los Angeles, which won three straight home games facing Colorado last weekend in walkoff fashion.

RHP Tyler Beede (1-2, 6.96) takes the mound for the series opener Thursday against Arizona with the Giants going 5-1 in his starts this year. He made his major league debut vs. the Diamondbacks last season on April 10, 2018.

___

More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP_Sports