Updated

Joaquin Arias scorched a game-tying, pinch-hit double in the ninth inning and scored the go-ahead run as the San Francisco Giants took a 3-2 triumph over the Houston Astros in the opener of a three- game set Tuesday at Minute Maid Park.

The Astros took the lead in the eighth when San Francisco starter Matt Cain uncorked a wild pitch with a runner on third, but the Giants battled back in the ninth, as Brandon Belt singled off Wesley Wright before Arias entered as a pinch-hitter to face Wilton Lopez (5-3).

Arias ripped a double down the third-base line to score Belt from first and pinch-hitter Hector Sanchez followed two batters later with a looping single into shallow center field to score Arias for a one-run lead.

"It goes to show you how important the bench is," Giants manager Bruce Bochy said. "They delivered tonight."

Sergio Romo retired the Astros in order in the ninth to record his seventh save of the season, while Santiago Casilla (5-5) recorded the final two outs of the eighth to earn the victory.

Angel Pagan doubled and added a solo shot for the Giants, who won for the sixth time in their last eight games.

Brett Wallace registered three of Houston's six hits and Fernando Martinez clubbed a solo home run, but the Astros lost for the 10th time in their last 11 tries.

Cain had held Houston to just one run on Martinez's fifth-inning shot, but ran into trouble in the eighth after walking Jimmy Paredes to start the frame and then giving up a single to Wallace.

Jason Castro's bunt moved both runners up before Cain then walked Tyler Greene. The fourth ball skipped to the backstop, allowing Paredes to score and give the Astros a 2-1 lead.

Houston starter Bud Norris allowed one run -- Pagan's solo homer in the fifth -- on six hits with seven strikeouts over 6 2/3 frames before leaving the game with a blister on his right middle finger.

"An occupational hazard, some guys get it, some guys don't," Norris said of his blister. "Just have to manage it day-by-day and go from there."

He threw two balls to Pagan before giving way to Fernando Rodriguez, who walked Pagan before striking out Marco Scutaro to end the seventh.

Rodriguez then retired the Giants in order in the eighth, but the bullpen was unable to hold the visitors down in the ninth after the Astros grabbed the lead in the previous inning.

Game Notes

Norris is winless over his last 15 starts and hasn't earned a victory since May 21 ... Cain was charged for two runs on six hits and three walks over 7 1/3 innings ... Paredes, who was recalled from Triple-A Oklahoma City Monday, stole his first Major-League base in the first inning ... The announced attendance of 13,516 was the lowest at Minute Maid Park since it opened in 2000 ... Lopez had not allowed an earned run in eight career appearances against the Giants ... San Francisco entered the game 2-50 when trailing after eight inning.