The Minnesota Twins announced Wednesday that they have signed former Yankees pitcher Michael Pineda to a two-year contract.

Pineda, a free agent, is recovering from Tommy John surgery on his right elbow, performed in July. He might not be available for the 2018 season, but he could be ready for spring 2019.

His deal is worth $2 million the first year and $8 million for 2019.