The Pirates designated Williams for assignment in November.

CHICAGO (KDKA/AP) — Former Pirates pitcher Trevor Williams is headed to Chicago.

According to the Chicago-Sun Times, Williams and the Cubs have agreed to a one-year deal. The move is pending a physical.

READ MORE: Water Main Break Shuts Down Portion Of Lewis Run Road In West Mifflin

READ MORE: Allegheny County Police Investigating Shooting In Swissvale

The 28-year-old Williams spent five seasons with the Pirates, the last four as a member of the starting rotation. Williams went 31-37 with a 4.43 ERA in 106 career appearances in Pittsburgh. He put together a spectacular second half in 2018, going 7-3 with a 1.38 ERA over his final 12 starts.

The popular right-hander, however, was unable to build off that stretch in 2019 due in part to injuries and he struggled in 2020 while playing on a team that finished with the worst record in the majors. Williams went 9-17 with a 5.60 ERA during his final two seasons with the Pirates, including a 2-8 mark with a 6.18 ERA last season, giving up a National League-high 15 home runs.

The Pirates designated Williams for assignment in November.

MORE NEWS: UPMC Children's Hospital Named One Of The Best Children's Hospitals In The Country

(Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.)