Updated

Madison Bumgarner's first career start against the Houston Astros was one the San Francisco lefty will want to soon forget.

Bumgarner was rocked for seven runs and a season-high 11 hits, including an inside-the-park home run by rookie Jose Altuve to start the game, and the Giants lost to Houston 7-5 Saturday night.

"He was a little off tonight. I thought that was evident," Giants manager Bruce Bochy said. "He made some mistakes and had some bad luck to go with it. He just wasn't quite as sharp as he's been."

It was San Francisco's third straight defeat and its 16th over the past 22 games, a stretch in which the team has averaged just over 2.5 runs per game and hit a paltry .235.

Coming off back-to-back blankings at the hands of Atlanta and Houston, the Giants had their chances in this one.

With his team down 5-0, Cody Ross hit a two-run single in the fourth to snap San Francisco's 21-inning scoreless streak.

Aubrey Huff hit a solo home run to get the Giants within two runs in the seventh, and Pablo Sandoval did the same with a two-run double in the ninth.

But true to another trend of late — they entered the game hitting just .165 with runners in scoring positions during their dreadful span — the Giants were 2 for 11 in those spots and stranded nine runners.

"You have to like the way they were fighting today," Bochy said. "They were trying to get back in it. These are tough streaks you get in like this, and the only thing you can do is keep fighting."

Altuve had three hits and fellow rookie J.D. Martinez homered, doubled and drove in four runs as the Astros matched a season high with their fourth straight win.

Rookie Jordan Lyles (2-7) gave up two runs, both of them unearned, in five innings. Mark Melancon got two outs for his 13th save.

Bumgarner (7-12) entered the game averaging the second-lowest support in the majors at 2.89 runs per game

"I felt like it was a battle the whole night trying to get the ball where it's supposed to go," Bumgarner said. "I was trying to fight through it and make pitches. They did a good job tonight of hitting the ball."

"Just one of those days," he said. "You don't really have anything working. Just have to find a way to get through it. It stinks that I gave up that many runs, especially with our offense scoring five runs."

Altuve opened the bottom of the first with a drive off the wall in left-center field. Ross came over from center field to track down the ball and relayed to shortstop Mike Fontenot, whose throw to the plate was high and wide.

Third base coach Dave Clark put up a stop sign, but Altuve ran through it and scored.

"As soon as I hit it, I knew it was in the gap," Altuve said. "I just kept running hard. I saw that the center fielder didn't know where the ball was. I just kept running. As I was close to third base, I tried to look up, but Sandoval was blocking me, so I couldn't see. When I realized there was a sign, it was too late."

The home run was the first inside-the-parker for the Astros at Minute Maid Park since Adam Everett on Aug. 6, 2003. The last Houston player to hit an inside-the-park shot for his first career homer was pitcher Butch Henry on May 8, 1992, at Three Rivers Stadium in Pittsburgh.

Tony Campana of the Cubs was the last player whose first big league home run was inside the park. He did it Aug. 5 against Cincinnati.

The Astros scored four times in the third for a 5-0 lead. Martinez hit a double that drove in Lyles and Altuve, who had both singled. Later in the inning, an error by Bumgarner set up Jimmy Paredes' RBI single and Clint Barmes' sacrifice fly.

Ross cut it to 5-2 with a two-out, two-run single in the fourth. Huff hit a solo homer in the seventh.

Martinez extended the lead to 7-3 with his fifth homer, a two-run shot that chased Bumgarner.

Melancon relieved in the ninth and gave up Sandoval's two-run double before getting two groundouts to end it.

NOTES: Giants OF Carlos Beltran, on the 15-day disabled list retroactive to Aug. 8 with a strained right hand, took batting practice from the right side and hit from both sides in the batting cage before the game. ... RHP Henry Sosa (0-2) gets the start in the series finale Sunday against the Giants. San Francisco announced LHP Dan Runzler (1-2) as its starter. It would be Runzler's first start of the season. Giants manager Bruce Bochy said LHP Jonathan Sanchez, who has a left ankle sprain, would not start after reporting soreness in his ankle after throwing off a flat surface Friday.