In St. Louis, Dave LaPoint won his first of the season and first for San Francisco. He pitched a six-hitter against his former teammates as the Giants broke a four-game losing streak.
The Giants had lost 10 straight games on the road.
LaPoint, who struck out six and walked two, beat Joaquin Andujar (4-1) for his second career shutout. LaPoint, obtained by San Francisco in February with three other St. Louis players for Jack Clark, had lost his first four decisions.
"It wasn't very comfortable, I'll tell you that," said LaPoint, whose earned run average dropped to 1.73. "Those are guys I'd shared jokes with for three-four years. But I guess in a way it worked out better that way. I had to put it all out of my mind. It helped me to concentrate."
Two errors by Andujar in the second inning helped San Francisco take a 2-0 lead.
Chili Davis singled to open the inning, Chris Brown walked and two errant pickoff throws by Andujar put them on second and third. Gary Rajsich's grounder scored Davis and Brown came home on a sacrifice fly.
"It's nice to see someone making errors besides us," Davis said.