July 22, 2021 | 2: 34am | Updated July 22, 2021 | 3: 06am

LOS ANGELES — Wilmer Flores hit a go-ahead, two-run homer off closer Kenley Jansen in the ninth inning and the San Francisco Giants rallied past the Los Angeles Dodgers 4-2 on Wednesday night.

Mike Yastrzemski homered early to help the Giants regain a two-game lead in the NL West over the defending World Series champions. San Francisco has won two of three in a four-game series between the longtime rivals that wraps up Thursday night.

The Giants had just four hits before Flores’ drive, which quieted the sellout crowd at Dodger Stadium. Buster Posey delivered a pinch-hit single to start the ninth, and Flores followed with a two-run shot to left field that put San Francisco in front 3-2.

“Wilmer Flores is as clutch as anyone over the last two seasons,” Giants manager Gabe Kapler said. “That was his MO in New York. He’s always been clutch and thrived in the biggest moments.”

Wilmer Flores is all smiles after belting the go-ahead two-run homer in the ninth inning of the Giants’ 4-2 win over the Dodgers.
AP

It was the 11th homer of the season for Flores. Jansen (1-3) fell to 21 for 25 in save opportunities.

“It’s just a bad one,” Jansen said. “I don’t want to overthink it. I work my butt off too hard to let one moment like this try to mess your season up. Ain’t no time to think about it. … I’ve got to do better. Get those last three outs.”

Victor Gonzalez walked Curt Casali with the bases loaded, making it 4-2.

Tyler Rogers, who took the loss Tuesday after allowing a game-ending homer to pinch-hitter Will Smith, earned his 11th save by pitching a scoreless ninth.

Rogers and Kapler shared an enthusiastic hug afterward.

“That was huge to get right back out there and not have to try to forget about