The Pittsburgh Pirates have agreed to a three-year, $39 million contract with Francisco Liriano, according to sources.

Liriano has spent the past two seasons with the Pirates.

The 31-year-old went 7-10 with a 3.38 ERA last season. In 2013, he posted a career best in victories, finishing with a 16-8 record and a 3.02 ERA.