Updated

As if the Houston Astros needed any confirmation, on Thursday night they found themselves reaching the same old conclusion: No lead is safe with their bullpen.

Right-handers Fernando Rodriguez and Rhiner Cruz combined to give up five runs in the final three innings, and the Astros blew a four-run lead in an 8-4 loss to the San Francisco Giants.

"When the game is on the line and we have to go out there, we're looking for that guy," Astros' interim manager Tony DeFrancesco said of his bullpen situation.

Houston is only 35-11 this season when leading after six innings. Houston starter Jordan Lyles entered the fifth inning with a 4-0 lead before giving up three runs in an otherwise solid outing for the Astros, who lost their fifth straight.

"The bottom line is we had lead going into the seventh inning, and somebody is going to have to step up out in that bullpen," DeFrancesco said. " And they're going to have to make pitches when they have to."

Matt Dominguez tied a career high with three hits — including a double and a triple — and Jimmy Paredes collected his first hit of the season in a 2-for-4 night for the Astros.

Brandon Belt tied a career high with four hits to go with an RBI, and Joaquin Arias extended his hitting streak to eight games with a solo home run off Cruz in the eighth for the Giants, who swept the three-game series and won for the eighth time in 10 games.

The game was played before just 12,835, which set a record for the smallest crowd at 12-year-old Minute Maid Park for the third straight night.

Former Astros star Hunter Pence and Pablo Sandoval each drove in two runs and scored one for San Francisco, which improved to 17-5 on the road.

Pence hit a two-run single with two outs in the seventh inning to give the Giants their first lead of the game.

Pence sent a full-count fastball by Rodriguez over second base to drive in Pablo Sandoval and Buster Posey and give San Francisco a 6-4 lead.

His performance came a night after he had a three-run homer against his former team in a 6-4 win.

Rodriguez (1-9), who was tagged for the loss, did not help the case with two wild pitches in the inning to advance Sandoval to third and Posey to second before Pence's clutch hit.

Marco Scutaro and Angel Pagan each had an RBI for the Giants, who swept a series for only the sixth time in 16 tries.

San Francisco's resurgence at the plate helped right-hander Ryan Vogelsong to his second win in as many starts.

Vogelsong (12-7) gave up four runs on seven hits over six innings. He struck out seven and walked one.

"He's a good pitcher," Astros shortstop Tyler Greene said of Vogelsong. "He's got one of the top ERAs in the league; he knows what he's doing."

The Astros got off to a promising start.

Jason Castro doubled off Vogelsong to score Jose Altuve with two outs, then came home on a sharp line drive to center by Paredes to give the Astros a 2-0 lead.

Dominguez hit his first career triple and scored on a sacrifice fly in the third inning, and Greene put the Astros ahead 4-0 with an opposite field solo home run in the fourth.

It was Greene's eighth home run of the season and fourth since the Astros traded for him Aug. 9.

The Astros could not hold on, however and the problems started when the Giants pounded on Lyles in the fifth inning.

Pagan drove in Gregor Blanco with a grounder down the left field line to put San Francisco on the scoreboard.

Scutaro followed with a one-out RBI single to Greene, and Sandoval's sacrifice fly with one out scored Pagan to get the Giants within one run.

"I have to learn from my mistakes and somehow, when the offense does a good job like they did tonight and the defense plays as well as they did, I have to learn how to manage the game and not give up three or four runs."

Lyles (3-10) gave up three runs on seven hits. He struck out two and walked none.

Cruz gave up a run each in the eighth and ninth inning, with Pence capping the scoring on a Belt double.

NOTES: Astros' OF Justin Maxwell entered the game as a defensive replacement in the seventh inning. It was the first time he's played since Aug. 21 because of a bruised right index finger. ... Houston left-hander Dallas Keuchel was optioned to Oklahoma City to make room on the roster for Dominguez. ... Houston OF Ben Francisco, who was scratched from Wednesday's lineup with discomfort in his right wrist, also sat out Thursday. ... The Astros open a series with Cincinnati on Friday and the Giants travel to face the Cubs.