SAN FRANCISCO -- Francisco Liriano didn't make a lot of consistent pitches in the strike zone. The few times when the Pirates left-hander did find his spots, the results were just as frustrating.
So much for chasing history.
Liriano lasted just four innings in his bid to become the first Pirates southpaw in more than 20 years with 15 wins, and the San Francisco Giants made their former farmhand pay for his lack of control in a 6-3 win over Pittsburgh on Saturday night.
"The whole night was a battle for me," said Liriano, who pitched with runners on base in every inning. "I was getting deep in counts, 3-2 counts a lot. Every time I made some good pitches they fouled them off or found a way to put them in play."
Nearly all of the damage off Liriano (14-6) came in the first when the Giants batted around and scored four times.
Liriano, who had allowed only one run over his previous 16 innings, gave up three straight hits to open the inning, including Buster 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.
"Just inconsistent command," Pirates manager Clint Hurdle said. "He had to battle. It was a street fight for four innings. He didn't have it tonight. The rhythm was inconsistent and the command was inconsistent."
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.
Even when things went right for the Pirates, there was a twist.
Tony Sanchez hit his first career home run for Pittsburgh but the team was unable to retrieve the milestone ball. Fans in the outfield bleachers at AT&T Park threw a ball back onto the field but it was not one used by major league baseball.
The loss dropped the Pirates into a first-place tie with St. Louis in the NL Central with 33 games left in the regular season.
"People were worried about us being a .500 ballclub and the next thing you know we're neck and neck going into the end of the season," center fielder Andrew McCutchen. "The expectations, we exceeded those. Now we have the opportunity to do even more."
Posey had three hits and Sandoval drove in two runs to back Tim Lincecum's uneven outing.
Lincecum (7-13) 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.
Six San Francisco relievers completed the six-hitter. Sergio Romo worked the ninth for his 31st save.
"It was great to see us put up some early runs," Giants manager Bruce Bochy said. "We haven't done that in awhile, especially at home. Timmy rebounded from a rough start and I thought the early runs helped."
The Pirates knocked Lincecum out of the game in the sixth inning after McCutchen drew a one-out walk and Pedro Alvarez doubled. Pinch-hitter Gaby Sanchez singled off reliever Jose Mijares to drive in McCutchen. Tony Sanchez followed with an RBI single to trim the lead to 5-3.
The Pirates also had two runners on in the seventh but failed to score.
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. ... San Francisco is 13-3 in its last 16 games when scoring four or more runs. ... Pittsburgh has 16 home runs over its last 13 games.