SAN FRANCISCO, April 14 (UPI) -- Garrett Jones had three hits and two RBI for Pittsburgh Tuesday in the Pirates' 6-5 win over San Francisco.
Andy LaRoche and Aki Iwamura added solo home runs for the Pirates, who had lost four of their last five games.
Eugenio Velez hit a two-run homer for the Giants.
Matt Cain gave up three runs on five hits over six innings. The loss went to Jeremy Affeldt (2-1), who gave up an unearned run in the eighth.
Edgar Renteria bobbled a force play at second, allowing Andrew McCutchen to reach second safely with the score tied 3-3. McCutchen then scored on Jones' single.
The Pirates added two runs in the ninth on LaRoche's home run and an RBI single by Iwamura.