The Boston Red Sox have signed Koji Uehara to a two-year, $18 million contract to remain their closer.

Boston signed Uehara, 39, before he became eligible to negotiate with other clubs next Tuesday.

The deal nearly doubles the two-year, $9.25 million contract he signed with the Red Sox before the 2013 season.