Lopez happy to be staying put with Giants

Javier Lopez found a nice fit in San Francisco from the moment the Pittsburgh Pirates dealt him to the Giants at the 2010 trade deadline.

It hasn’t hurt he won a pair of World Series championships.

The free agent left-hander reached agreement on a $13 million, three-year contract to stay with the Giants. The deal is pending a physical, likely to take place next week, assistant general manager Bobby Evans said Thursday.

“I am happy to be back in San Francisco. It’s the place that my family and I have come to love,” Lopez wrote in an e-mail. “The Giants organization has been first class since I was first traded in 2010. The fans especially have been welcoming not only to me but all of my teammates and their support is unmatched in the major leagues. They make for a wonderful place to come and work.”

Can S.F. beat L.A.? It’s good news and bad news

Niners fans driving ticket prices through the roof for NFC Championship Game

The Niners can win even when Jimmy Garoppolo has an off night

What we learned during crazy NFL weekend