The Pittsburgh Pirates have brought back Francisco Liriano, agreeing to a three-year, $39 million deal with the left-hander, sources have confirmed to ESPN.

Liriano has spent the past two seasons with the Pirates. The deal was reported earlier Tuesday by CBS Sports.

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 after signing a one-year contract with a vesting option for 2014 with the Pirates that was delayed after Liriano injured his non-pitching arm over the holidays.

Liriano, who was paid $6 million in 2014, has a career record of 76-72 and a 4.07 ERA in nine seasons with the Twins, White Sox and Pirates.

Pittsburgh has posted back-to-back winning seasons and has reached the playoffs each of the last two years following a 20-year postseason drought.