Trevor Williams and the Washington Nationals agreed to a two-year contract Friday, giving the rebuilding club a right-handed pitcher with experience as a starter and reliever.

The agreement was confirmed to The Associated Press by a person familiar with the deal, speaking on condition of anonymity because nothing had been announced yet.

It was first reported by MASNsports.com.