Robert Edwards-USA TODAY Sports

Mike Yastrzemski doubled, homered and drove in three runs, and Alex Young pitched out of a bases-loaded jam in the eighth inning Friday night to protect a one-run lead as the San Francisco Giants held off the visiting Pittsburgh Pirates 5-3.

The opener of the three-game series also began a seven-game homestand for the Giants.

Yastrzemski led off a two-run second inning with his 12th homer of the season, increased the lead to 3-0 in the third with a run-scoring fielder's choice grounder, and continued the San Francisco scoring in the fifth with an RBI double.

All of Yastrzemski's RBIs came against Pirates starter Bryse Wilson (2-7), who worked 5 1/3 innings, giving up four runs and six hits. He walked two and struck out one.

The Giants led 4-1 after Yastrzemski's RBI barrage, then 4-2 when Ben Gamel homered off Carlos Rodon (11-6) in the sixth, his fifth of the season.

Rodon was pulled after six innings, having allowed two runs and six hits. He struck out seven without issuing a walk.

Pittsburgh's other run off the Giants' starter came on a solo homer by Rodolfo Castro, his second of the year, in the fourth inning.

The Pirates drew within 4-3 in the seventh against the San Francisco bullpen when Greg Allen belted his first homer of the season, Pittsburgh's third solo shot of the contest.

The Pirates had runners on first and second with one out in the eighth. Young, who was purchased last month from the Cleveland Guardians, walked Oneil Cruz to load the bases, but struck out Allen and got Yucupita Marcano to ground out.

In the bottom of the eighth, Luis Gonzalez's two-out double scored Evan Longoria, who drew a two-out walk, for an insurance run.

Closer Camilo Doval threw a 1-2-3 ninth inning for his 16th save.

Gonzalez finished with two RBIs for the Giants. Gamel, Castro and Allen had two hits apiece for the Pirates, who fell to 2-6 on their 10-game trip despite out-hitting the hosts 10-7.

More must-reads:

TODAY'S BEST
Timberwolves chew up Nuggets to force Game 7
Rangers secure spot in conference finals after stunning third-period comeback over Hurricanes
Xander Schauffele makes history in first round of PGA Championship
Yankees' Hal Steinbrenner shares massive Juan Soto contract update
Steelers' Cameron Heyward addresses contract holdout
Knicks star ruled out for potential closeout game
Dodgers starter undergoes season-ending UCL surgery
Clemson’s Dabo Swinney gives smug response about not using transfer portal
Caitlin Clark's debut was most-watched WNBA game in more than 20 years
Watch: Chris Kreider's natural third-period hat trick shatters Hurricanes' comeback hopes
Veteran NFL safety will either play for this team or retire in 2024
Former Red Wings head coach linked to open NHL job
How Patriots' Drake Maye has already impressed Jacoby Brissett
LeBron James, Giannis Antetokounmpo, Stephen Curry among Forbes' highest-paid athletes for 2024
Steve Cohen addresses if Mets could again be trade-deadline sellers
Tiger Woods ruins strong first round with sloppy finish at PGA Championship
NFL responds to speculation about Chiefs schedule and Taylor Swift
Despite hopes for change, NASCAR championship weekend will return to Phoenix in 2025
Chiefs will achieve something not done since 1927 with 2024 schedule
Yankees' Aaron Judge comments on resurgence after bad slump

Want more Giants news?

Join the hundreds of thousands of fans who start their day with Yardbarker's Morning Bark, the best newsletter in sports.