Buster Posey of the San Francisco Giants hits the game winning hit in the bottom of the 13th inning to beat the Chicago Cubs, at AT&T Park in San Francisco, California, on July 11, 2018 (AFP Photo/EZRA SHAW)

San Francisco (AFP) – San Francisco’s Buster Posey, ruled out of next week’s Major League Baseball All-Star Game with a nagging right hip injury, smacked a walk-off single Wednesday to lift the Giants to a 5-4 victory over the Chicago Cubs.

The Giants catcher, whose injury has depleted his power at the plate this season, had enough to deliver the goods in the 13th inning, his single off the right field wall scoring Brandon Belt and securing the win.

Earlier in the inning, Cubs hurler James Norwood issued a two-out walk to Belt.

Andrew McCutchen singled to left field to extend the inning and Posey belted a 2-2 pitch to the opposite field to settle matters after four hours and 30 minutes.

The Giants had jumped to a quick lead with four runs in the first inning off Cubs starting pitcher Mike Montgomery.

Chase d’Arnaud’s first career leadoff homer launched the inning before Gorkys Hernandez delivered a two-run double and Steven Duggar produced a run-scoring single.

The Cubs clawed back with Javier Baez‘s solo home run in the seventh inning knotting the score at 4-4, neither team able to break the stalemate until the Giants finally broke through in the 13th.

Posey, the 2012 National League Most Valuable Player was selected to his sixth All-Star Game last Sunday as a reserve.

But Giants manager Bruce Bochy told reporters his catcher would miss the mid-season exhibition next Tuesday in Washington, and would instead have a cortisone injection and rest during All-Star week in a bid to quiet the inflammation in his right hip.

“We talked about this in the past month, how we could get to the break and get this injection and hopefully get it to calm down and clear up,” Bochy told the San Francisco Chronicle.

“He’s been playing with it. You could tell. It’s bothering him. He’s been a warrior through this and had missed some time earlier for two or three days. The break will serve him well.”