WASHINGTON (AP)Trevor Williams and the Washington Nationals finalized a two-year contract Saturday, giving the rebuilding club a right-handed pitcher with experience as a starter and reliever.

Williams, who turns 31 in April, was a free agent after pitching for the New York Mets last season, going 3-5 with a 3.21 ERA and one save in 30 appearances – nine as a starter and 21 out of the bullpen.

On Nov. 25, the day after Thanksgiving, Williams tweeted: ”BLACK FRIDAY FREE AGENT SALE! TODAY ONLY! 2 for 1 Deal: Buy one Trevor Williams the RHP and also get Trevor Williams the LHH Corner Outfielder! (deal expires at midnight EST).”

Williams made his major league debut in 2016 and has pitched for the Pirates, Cubs and Mets across seven seasons, posting a 4.27 ERA with a record of 38-44.

Washington is in need of pitching help, particularly in a rotation that has been missing injured Stephen Strasburg. Young pitchers Josiah Gray, 24, Cade Cavalli, 24, and MacKenzie Gore, 23, are considered building blocks for the future, but the only other starter considered likely to be back on the team is Patrick Corbin, who was a key part of the 2019 World Series championship but was 6-19 with a 6.31 ERA last season.

The Nationals finished last in their division at 55-107 in 2022 – the worst record in baseball – and are in the process of rebuilding their roster a few years after winning the franchise’s first title. Their offseason has been relatively quiet so far compared to the splashy spending of NL East rivals such as the Mets and Philadelphia Phillies.

The agreement with Williams came about 1 1/2 weeks after Washington signed free-agent infielder Jeimer Candelario for one year and agreed to a major league deal with outfielder Stone Garrett.

AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports