Giants beat Pirates to stop slide
"I'll take it," Posey said. "Hopefully we can build on this moving forward. We got hits. We got hits with guys in scoring position and we had second and third right out of the chute. Those guys set the table."
Lincecum pitched into the sixth inning after two rocky starts for his first win in more than two weeks. The former two-time NL Cy Young winner walked four but struck out eight and pitched out of trouble in back-to-back innings before giving way to the bullpen.
"The early runs give you a lift and you don't have to worry about making a mistake," Lincecum said. "They give some leeway but it was still a little frustrating not being able to go deeper. I has trouble locating the fastball but stayed aggressive in the strike zone."
The Giants did most of the damage in the first inning when they batted around and scored four times off Pirates starter Francisco Liriano (14-6).
"That was good for the whole team," Giants catcher Hector Sanchez said. "It helped us all feel more comfortable."
The Giants chased Liriano after the fourth but added on against the Pirates bullpen. Sanchez was hit by a pitch with one out in the fifth and scored on a wild pitch by reliever Jared Hughes, making it 5-1.
Lincecum (7-13) made it stand up. He breezed through the first three innings then walked the first two hitters in the fourth. He quickly recovered and got Andrew McCutchen to fly out then struck out Pedro Alvarez and Garrett Jones.
"The first five and six innings I'm a fan and I get to watch him do his thing," said Giants closer Sergio Romo, who pitched the ninth for his 31st save. "Tim has been impressive all the time he's been here and watching him go through the ups and downs makes me appreciate him all that much more."
NOTES: Giants LHP Jeremy Affeldt (groin strain) threw off a mound and could begin a rehab assignment as early as next week. ... Sandoval is 15 for 38 (.395) with nine RBIs in his last 11 games. ... RHP Ryan Vogelsong (2-4, 6.29) starts for the fourth time since coming off the DL. He's 1-3 in four starts against his former team.
Copyright 2013 by The Associated Press
This story is from ESPN.com's automated news wire. Wire index
MORE MLB HEADLINES
- Source: Kuroda leaving MLB, returning to Japan
- Uggla, Bell agree to deals with Nationals
- Caffeine free: Nats P tweets out comped java
- Braves, reliever Grilli agree to 2-year deal