The Giants left the potential game-tying and go-ahead runs in scoring position in the 9th inning as the Pirates won their second straight game in San Francisco by a 4-3 final.
For the first time since May 10, the Giants are not the leaders in the National League West as the Dodgers moved past them with a win in Philadelphia earlier Tuesday.
The Giants and Pirates were tied at 3-3 heading into the 8th, but Jung Ho Kang gave Pittsburgh the lead with a solo home run off Derek Law, who entered with a 19-game scoreless streak.
The Giants had Gregor Blanco on third and Joe Panik on second with one out in the 9th, but Pirates closer Tony Watson induced a pop fly from Ehire Adrianza and a routine groundout to second base from Denard Span to end the game.
Bruce Bochy’s club, 9-20 since the All-Star break, will look to avoid the sweep on Wednesday with a 12:45 pm first pitch on KNBR 680.