San Francisco: The Giants’ bullpen had another tough night and squandered a chance to close in on the NL West lead.

Ryan Schimpf hit a go-ahead three-run homer with two outs in the ninth inning, and San Francisco’s relievers gave up a lead and chance to gain ground on the division-leading Dodgers in a 6-4 loss to the San Diego Padres on Tuesday night.

“It’s a punch in the stomach,” Giants manager Bruce Bochy said. “You’ve got to bounce back.”

Hunter Strickland (3-3) started the ninth and allowed two runs, three singles and a bases-loaded walk to Wil Myers, then Steven Okert entered to try to get the final out. Schimpf clobbered the fourth offering and sent it into the center-field bleachers for his 19th homer.

Jake Smith (1-0) pitched the eighth for his first career victory after San Diego claimed him from the Giants in July, then Kevin Quackenbush finished for his second save as some Giants fans booed.

“Schimpf really did all the work. I just threw up a zero,” said Smith, who was once on the grounds crew for the Giants’ Class A Augusta affiliate.

Okert offered no excuses. He was ready to go despite the short notice to warm up.

“It’s September, we’re in the playoff race, you’re checked in the whole game,” he said.

There were two bloopers and a groundball Buster Posey stopped at first base only to have the ball ricochet off his glove on a failed play. The Giants blew their sixth save in 10 September opportunities.

Angel Pagan homered leading off the fifth and Gorkys Hernandez also homered for the Giants, who stayed four games back of NL West-leading Los Angeles after the Dodgers lost earlier at the New York Yankees. San Francisco remained percentage points ahead of the Mets for the top NL wild-card spot.

Hunter Pence hit a run-scoring double and Brandon Crawford had an RBI single for San Francisco, which will host St. Louis for a four-game weekend set and still must play six with the Dodgers among the final 18 games of the season.

“That’s just buzzard luck that inning for Strick early,” Bochy said. “Up until that inning it couldn’t have gone better.”

Albert Suarez, who has bounced between the rotation and bullpen, had been in position to win for the first time since June 23 at Pittsburgh — a span of six starts and 10 outings. The right-hander gave up one run and six hits, struck out one and walked two in five innings.

Shut out on five hits a night earlier, the Giants got a unique line-up from Bochy — and not all by design, either.

Posey had been scheduled to have a night off but Bochy used his regular catcher at first base given all of the other regulars not in the line-up. First baseman Brandon Belt was ill.

The Giants lost their fifth straight to San Diego during which they had been outscored 26-14 after winning the initial nine matchups of 2016.

Padres starter Clayton Richard surrendered a season-high 11 hits in 5 2/3 innings. He allowed three runs, struck out four and walked three in his sixth start of the season for the Padres after signing last month following his release by the Cubs.

— AP