CINCINNATI (Reuters) - An Ohio man pleaded guilty on Monday to charges he plotted to attack the U.S. Capitol with guns and bombs and that he sympathized with Islamic State militants.

Christopher Cornell, 20, of Cincinnati, Ohio is pictured in this handout photo obtained by Reuters January 14, 2015. Butler County Jail/Handout via Reuters

In an appearance in federal court in Cincinnati, Christopher Cornell, 22, shackled and dressed in black-and-white striped jail clothes, admitted to the charges of attempted murder of government officials, possession of a firearm to commit a crime and attempting to provide material support to a foreign terrorist organization.

Cornell, who mainly answered the judge’s questions with “yes ma’am” and “no ma’am,” faces up to 30 years in prison and a lifetime of supervision, according to officials at the hearing.

Cornell, of Green Township, Ohio, near Cincinnati was arrested in January 2015 and accused of planning to travel to Washington to attack the U.S. Capitol during President Barack Obama’s State of the Union address on Jan. 20, 2015, prosecutors said, citing the plea agreement.

Cornell initially pleaded not guilty. His sentencing hearing was scheduled for Oct. 31.

A lawyer for Cornell, Martin Pinales, said the guilty plea was in the best interest of his client. Cornell’s father, who previously told Ohio media he felt his son was set up by an FBI informant, declined to comment on the plea.

“We love Christopher very much and we all support him,” John Cornell said.

Cornell researched the construction of pipe bombs, purchased two semi-automatic rifles and 600 rounds of ammunition, and made plans to travel to Washington to carry out the plot, according to the original indictment.

After his arrest, he posted statements online that included a call for others to join him in violent jihad against the United States on behalf of Islamic State, prosecutors said, citing the plea agreement. Islamic State militants control parts of Iraq and Syria and have sympathizers and supporters around the world who have carried out bombings and shootings of civilians.

In April, U.S. District Judge Sandra Beckwith in Cincinnati ruled that Cornell, who has been held without bond since his arrest, was competent to stand trial. Last November, the judge ordered a psychiatric evaluation for Cornell after his attorneys questioned his mental competence.