SAN FRANCISCO — Buster Posey had three hits, Pablo Sandoval drove in two runs and the San Francisco Giants beat the Pittsburgh Pirates 6-3 on Saturday night.
Tim 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 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).
Tony Sanchez hit his first career home run for Pittsburgh, which dropped into a first-place tie with St. Louis in the NL Central.
Liriano, attempting to become the first Pirates left-hander in more than 20 years to reach 15 wins in a single season, had allowed only one run over his previous 16 innings before getting knocked around by the Giants.
The former San Francisco farmhand gave up three straight hits to open the first inning, including Posey’s broken-bat RBI single. Brett Pill followed with a check swing infield single that drove in Joaquin Arias and made it 2-0.
After Posey scored on Sandoval’s groundout, Gregor Blanco added an RBI single to give the Giants a 4-0 lead.
The Giants chased Liriano after the fourth but added on against the Pirates bullpen. Hector 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. The two-time NL Cy Young winner quickly recovered and got Andrew McCutchen to fly out then struck out Pedro Alvarez and Garrett Jones.
Six San Francisco relievers completed the six-hitter. Sergio Romo worked the ninth for his 31st save.
Pittsburgh broke through on Sanchez’s leadoff home run in the fifth and scored twice more in the sixth but left the potential tying runs on base when reliever Jean Machi struck out Andrew Lambo and got Cliff Barnes to ground out.
The Pirates also had two runners on in the seventh but failed to score.
NOTES: Pirates leadoff hitter Starling Marte was placed on the 15-day disabled list with a bruised right hand before the game. Marte’s replacement, Lambo, was called up from Triple-A Indianapolis before the game and went hitless in three at-bats. ... Giants LHP Jeremy Affeldt (groin strain) threw off a mound and could begin a rehab assignment as early as next week.