Updated

SAN FRANCISCO (AP) -- Giancarlo Stanton hit his 24th home run to back another strong start by Dan Straily, and the Miami Marlins beat the San Francisco Giants 6-1 on Friday night.

J.T. Realmuto also homered and had three hits, Dee Gordon added four hits and JT Riddle drove in two runs to help the Marlins win the opener of their final series before the All-Star break.

The Marlins batted around during a four-run first inning highlighted by Stanton's opposite field two-run homer off starter Matt Moore (3-9).

Stanton -- who will defend his title in the Home Run Derby at next week's All-Star Game in Miami -- also doubled off the bricks in right field in the fourth.

Denard Span homered into McCovey Cove off Straily with one out in the ninth.

Six of the first eight Marlins hitters reached base during the first-inning onslaught, including four consecutive two-out singles. Miami has scored 67 first-inning runs this season, second in the majors behind Milwaukee's 75.

Straily (7-4) made it stand up to remain unbeaten in four career starts against San Francisco. The Miami right-hander allowed four hits and came within two outs of pitching his first career complete game while improving to 6-1 over his past 12 starts.

Dustin McGowan retired two batters to complete the five-hitter.

Realmuto hit his eighth home run in the fifth off Cory Gearrin.

The Giants, coming off their first winning road trip of the season, had only one runner advance past first base.

Moore retired only 10 batters and allowed five runs and 12 hits.

TRAINER'S ROOM

Marlins: RHP Edinson Volquez was placed on the 10-day DL with left knee tendinitis. The move is retroactive to July 6.

Giants: Austin Slater left the game after injuring himself trying to run out a grounder in the eighth inning. . LHP Madison Bumgarner threw a bullpen session before the game and is scheduled to pitch for Single-A San Jose on Monday. Manager Bruce Bochy said that it's possible Bumgarner -- who will throw about 90 pitches for San Jose -- will rejoin the big league club shortly after the All-Star break. . RHP Johnny Cueto (ear infection) is doing better after being scratched from his scheduled start Thursday in Detroit. . Ryder Jones was placed on the 10-day DL after being hit by a pitch on his left wrist on July 1.

UP NEXT

Marlins LHP Chris O'Grady was called up from Triple-A New Orleans and will make his major league debut Saturday night while the Giants counter with RHP Jeff Samardzija (4-9, 4.54). Samardzija had a 0.68 ERA in two starts against Miami in 2016.