Wilmer Flores hit a go-ahead homer in the fourth, Mike Yastrzemski returned from an injury to splash a two-run shot into McCovey Cove the same inning and the San Francisco Giants beat the San Diego Padres 5-4 in the first game of a doubleheader Friday for a key victory in a crowded NL playoff race.

The Padres clinched home-field advantage for the wild-card round next week with the Cardinals’ loss to Milwaukee in the first game of a doubleheader. San Diego secured the National League’s No. 4 seed headed to its first postseason in 14 years.

More Images
San Diego Padres starting pitcher Chris Paddack works against the San Francisco Giants during the first inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

Wilmer Flores hit a go-ahead homer in the fourth, Mike Yastrzemski returned from an injury to splash a two-run shot into McCovey Cove the same inning and the San Francisco Giants beat the San Diego Padres 5-4 in the first game of a doubleheader Friday for a key victory in a crowded NL playoff race.

San Francisco Giants starting pitcher Tyler Anderson throws to a San Diego Padres batter during the second inning of the first game of a baseball doubleheader on Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

Tyler Anderson (4-3) allowed five hits over six solid innings, striking out four and overcoming four walks. Tony Watson gave up an RBI single to Fernando Tatís Jr. in the seventh and made a throwing error past first baseman Brandon Belt for another run before Eric Hosmer's sacrifice fly.

San Francisco Giants starting pitcher Tyler Anderson works against the San Diego Padres during the first inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

Tommy Pham hit an RBI double in the second before Brandon Crawford’s homer off Chris Paddack (4-5) tied it in the bottom half.

San Francisco Giants' Brandon Crawford hits a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

REFRESHED FERNANDO

San Francisco Giants' Brandon Crawford, left, is congratulated by third base coach Ron Wotus as he runs the bases after hitting a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

“Just resting, seeing the game from a different side, seeing if I could learn some stuff ... just enjoy the day off," he said.

San Francisco Giants' Brandon Crawford points to the sky as he crosses home plate after hitting a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

TRAINER’S ROOM

The Giants (29-28) bounced back — barely — after missing a key chance losing in 11 innings to Colorado on Thursday. Wild card-leading Cincinnati began the day 29-28 and was playing a night game at Minnesota.

San Diego Padres starting pitcher Chris Paddack works against the San Francisco Giants during the first inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

San Diego Padres starting pitcher Chris Paddack works against the San Francisco Giants during the first inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

Tyler Anderson (4-3) allowed five hits over six solid innings, striking out four and overcoming four walks. Tony Watson gave up an RBI single to Fernando Tatís Jr. in the seventh and made a throwing error past first baseman Brandon Belt for another run before Eric Hosmer's sacrifice fly.

The Padres were to be the home team in the second game, which is the makeup of a postponement in San Diego on Sept. 12 after Giants outfielder Alex Dickerson received a false positive COVID-19 test result.

Yastrzemski hit his second career splash hit homer in the bay, also doing so July 29 against the Padres.

San Francisco Giants starting pitcher Tyler Anderson throws to a San Diego Padres batter during the second inning of the first game of a baseball doubleheader on Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants starting pitcher Tyler Anderson throws to a San Diego Padres batter during the second inning of the first game of a baseball doubleheader on Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

Tommy Pham hit an RBI double in the second before Brandon Crawford’s homer off Chris Paddack (4-5) tied it in the bottom half.

Paddack was done after 3 2/3 innings and three home runs among his eight hits surrendered.

San Diego (34-23) is back in the playoffs for the first time since 2006, when the Padres lost in the division series for a second straight year.

San Francisco Giants starting pitcher Tyler Anderson works against the San Diego Padres during the first inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants starting pitcher Tyler Anderson works against the San Diego Padres during the first inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

REFRESHED FERNANDO

Tatís expressed feeling refreshed and well rested after he had a break Wednesday in the series finale against the Angels at Petco Park then a day off Thursday.

He went 1 for 4. Tatís is 5 for his last 31 the past seven games and 6 of 41 spanning the last nine.

San Francisco Giants' Brandon Crawford hits a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants' Brandon Crawford hits a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

“Just resting, seeing the game from a different side, seeing if I could learn some stuff ... just enjoy the day off," he said.

His father offered some encouragement.

“Right now it's just trust it, when this game attacks this way sometimes players lose confidence,” he said. “This game is hard for everybody.”

San Francisco Giants' Brandon Crawford, left, is congratulated by third base coach Ron Wotus as he runs the bases after hitting a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants' Brandon Crawford, left, is congratulated by third base coach Ron Wotus as he runs the bases after hitting a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

TRAINER’S ROOM

Padres: RHP Mike Clevinger received a cortisone shot Friday for his troublesome elbow. General manager A.J. Preller said the Padres have not ruled out Clevinger making a start in the wild-card round next week. Clevinger left his start Wednesday after just one inning against the Angels. Tests showed he has a right posterior elbow impingement. “I think we got really good news,” Preller said. Clevinger is expected to rest for 48 hours and then attempt to play catch. He was obtained in a blockbuster trade with Cleveland on Aug. 31. With questions around Clevinger, RHP Dinelson Lamet and RHP Zach Davies would be San Diego's likely 1-2 playoff pitchers.

Giants: OF Yastrzemski, who had missed seven straight starts and six games with a mild right calf strain, returned to start the opener and the hope was he would play Game 2, manager Gabe Kapler said.

San Francisco Giants' Brandon Crawford points to the sky as he crosses home plate after hitting a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

San Francisco Giants' Brandon Crawford points to the sky as he crosses home plate after hitting a solo home run against the San Diego Padres during the second inning of the first game of a baseball doubleheader Friday, Sept. 25, 2020, in San Francisco. (AP PhotoTony Avelar)

UP NEXT

RHP Jeff Samardzija comes off the injured list from a lengthy shoulder injury and rehab to pitch the second game as the 29th player for the doubleheader. He is 0-2 making just three starts this season and hasn’t pitched since Aug. 7.

“This is an opportunity he has been asking for, been pushing for,” Kapler said.

Lamet (3-1, 2.07 ERA) takes the mound for the Padres in the nightcap trying to win a second straight decision. He is 1-1 over his last seven outings.

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