The San Francisco Giants say they have agreed to a $62 million, four-year contract with closer Mark Melancon, pending a physical.

Because Melancon was traded during the season, the Giants don't have to give up their first pick in June's amateur draft as compensation.

The Giants blew 32 saves this past season, the last in a 6-5 Game 4 loss to the Cubs that ended San Francisco's season. Chicago scored four runs in the ninth as San Francisco manager Bruce Bochy tried five relievers in the inning.

Santiago Casilla and Sergio Romo, two reliable relievers in even-year championships of 2010, '12 and '14, were both inconsistent.