Updated

A 21-year-old man pleaded guilty in federal court Wednesday to two counts in connection with a plot to plant a bomb outside an Army post in northeast Kansas.

John T. Booker Jr., of Topeka, changed his pleas to guilty Wednesday in U.S. District Court to charges of attempting to use a weapon of mass destruction and attempting to use an explosive device to damage government property. A plea agreement with prosecutors recommends that he be sentenced to 30 years in prison on the first charge and 20 years on the second charge, to be served at the same time.

As part of the plea deal, prosecutors dropped a charge of attempting to provide material support to the Islamic State group.

Booker had initially pleaded not guilty to three felony charges. He could have faced life in prison if convicted of those charges.

He was arrested in April 2015 outside Fort Riley, about 60 miles west of Topeka, trying to arm what he thought was a 1,000-pound bomb in a van.

Booker was arrested in April 2015 outside Fort Riley, about 60 miles west of Topeka. He was trying to arm what he thought was a 1,000-pound bomb in a van.

Prosecutors allege Booker told an FBI informant he wanted to kill Americans and engage in violent jihad on behalf of the Islamic State group, and that he believed such an attack was justified because the Quran "says to kill your enemies wherever they are," according to a criminal complaint.

The hearing was delayed by several hours after Judge Carlos Murguia announced he'd received a letter from Booker. Neither he nor Booker's attorney gave details. Booker and his lawyer conferred with Murguia, and the attorney asked that the hearing be delayed until afternoon.

The Topeka Capital-Journal reported that it received a letter from Booker on Wednesday, saying he wants a new attorney to represent him. Also, Booker told the newspaper he sent a letter to Murguia last month. Defense attorney Kirk Redmond had declined to comment leaving court.