PITTSBURGH (AP) — Alex Wood pitched six innings while keeping his perfect record intact and Mike Yastrzemski hit a game-sealing home run as the San Francisco Giants beat the Pittsburgh Pirates 4-1 on Sunday.

Wood (5-0) gave up one run while scattering eight hits. He struck out six and walked one as NL West-leading San Francisco gained a split of the four-game series.

READ MORE: Elton John Will Make Tour Stop At PNC Park In 2022

It has been a resurgent season for Wood, who went a combined 1-4 with a 5.96 ERA in 2019 and 2020 with the Cincinnati Reds and Los Angeles Dodgers while hampered by back problems.

Yastrzemski’s two-run homer to right-center field in the ninth off David Bednar extended the Giants’ lead to 4-1. Yastrzemski returned to the lineup after missing Saturday’s game with side soreness.

San Francisco’s Buster Posey had three hits and a walk. The six-time All-Star catcher is enjoying quite a return, batting .382 in 26 games after opting out of last year’s shortened season because of COVID-19 concerns.

Sidearmer Tyler Rogers pitched a scoreless ninth inning for his fourth save.

Evan Longoria scored the tiebreaking run in the sixth on a wild pitch by reliever Clay Holmes. Longoria began the inning with a single off Mitch Keller (2-5).

Keller allowed two runs and six hits in five-plus innings while striking out eight and walking three. That was a major improvement over his previous start when he was rocked for seven runs in 3 1/3 innings by Cincinnati on Tuesday.

The Giants scored a run in the first inning on a grounder and Ka’ai Tom’s sacrifice fly tied it in the fourth.

READ MORE: Firefighters Rescue Dog Trapped Under A Shed In South Park Township

Mauricio Dubon added two hits for San Francisco. Adam Frazier and Erik Gonzalez had two hits each for Pittsburgh.

The Giants left a runner on base in every inning but the ninth and stranded a total of 10. The Pirates left nine men on after winning the previous two nights in walk-off fashion.

TRAINER’S ROOM

Giants: 1B Brandon Belt (left side tightness) was a late scratch. … LF Alex Dickerson (bone bruised in left shoulder) was activated from the 10-day injured list and OF Lamonte Wade Jr. was optioned to Triple-A Sacramento.

Pirates: C Jacob Stallings left the game with a left quadriceps contusion in the seventh inning after being struck by a foul tip. … 3B Ke’Bryan Hayes (left wrist strain) and RHP Chad Kuhl (right shoulder discomfort) are expected to begin rehab assignments later this week at Triple-A Indianapolis. … 1B Colin Moran and INF/OF Phillip Evans, both sidelined by hamstring injuries, might avoid rehab assignments.

UP NEXT

Giants: Open a four-game series at Cincinnati on Monday night with RHP Logan Webb (2-3, 4.74 ERA) facing Reds RHP Sonny Gray (0-2, 3.55).

Pirates: After having Monday off, begin a three-game series at St. Louis on Tuesday with RHP JT Brubaker (3-2, 2.58) opposing Cardinals RHP Jack Flaherty (7-0, 2.47), the MLB wins leader.

MORE NEWS: GOP Voting Law Bill Clears State House Amid Wolf Veto Threat

(Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)