HOUSTON -- Geoff Blum and Kaz Matsui homered off Matt Cain and the Houston Astros snapped the San Francisco righty's six-start unbeaten streak with a 4-3 win over the Giants on Monday night.
Blum led off the fifth with a homer to right, the first earned run allowed by Cain in 14 innings. That cut the Giants' lead to 2-1 and Matsui put Houston on top in the sixth with a two-run shot off the right-field foul pole.
Cain (12-3) also gave up Carlos Lee's RBI single in the eighth and the Giants lost for the first time in the last six games he started.
Mike Hampton (7-8) gave up eight hits, only one after the Giants took a 2-0 lead in the third. He struck out six and won for just the third time in eight starts.
Jose Valverde gave up an RBI double to Pablo Sandoval with two outs in the ninth, but got Bengie Molina to ground out to secure his 13th save.
The Giants led 1-0 in the first after consecutive singles by Sandoval, Molina and Ryan Garko.
Hampton allowed runs in the first inning for the 12th time in 19 starts. He came in with an 11.50 ERA in the first inning (23 earned runs), the highest in the majors among pitchers who started at least 15 games.
Edgar Renteria singled in the second, advanced on Cain's bunt and tried to score on Eugenio Velez's single to right. Hunter Pence's throw was off line, but catcher Ivan Rodriguez caught it and tagged out Renteria near the plate.
Freddy Sanchez singled in the third and went to third when Sandoval's hard grounder ricocheted off Hampton to the side of the mound. Molina's sacrifice fly made it 2-0.
Blum's sixth homer of the season was only the second allowed by Cain in seven starts.
Hampton plunked Garko with a pitch in the sixth and one out later, Renteria doubled over Lee's head in left. Hampton intentionally walked Randy Winn to load the bases, then struck out Cain and Velez.
Michael Bourn led off the Astros' sixth with a triple to right center, his NL-leading ninth of the season. Matsui homered off the right-field foul pole, his fifth of the season and second in five games.
Cain had not allowed two homers in a game since June 9.
Pence tripled to center in the eighth and Lee drove him in with a single to right. Houston's eight hits were the most allowed by Cain since Seattle had 10 in the Giants' 5-1 win on May 23.