A 28-year-old Missouri man who admitted plotting a terrorist attack in Kansas City has been sentenced to nearly 20 years in prison.

Robert Hester Jr. was sentenced Wednesday. He pleaded guilty in September to providing material support or resources to terrorists.

Hester, of Columbia, was charged in February 2017 with helping to plan an attack on buses, trains and a train station in Kansas City. Prosecutors said he thought he was working with ISIS terrorists but his contacts were actually undercover federal agents. Hester provided materials such as nails and duct tape that he believed would be used to create bombs.