Javier Lopez and the Giants have agreed to an $8.5 million, two-year contract, according to the Associated Press.
The 34-year-old was set to hit free agency before San Francisco locked him up. He'll earn $4.25 million in each of the next two seasons after earning $2.375 million in 2011. Lopez is 7-2 with a 2.38 ERA in 97 appearances since being acquired from Pittsburgh in 2010. The Giants must decide by Monday whether to exercise the $5 million contract option on fellow left-handed reliever Jeremy Affeldt, who had a 2.63 ERA in 67 appearances this season. Affeldt, who sustained a season-ending hand injury in September, has a $500,000 buyout.