A man accused of plotting to attack the U.S. Capitol in support of the Islamic State group during President Barack Obama's 2015 State of the Union address pleaded guilty Monday to three federal charges.

Federal prosecutors dropped a fourth count and said they would seek a maximum of 30 years in prison at the Oct. 31 sentencing hearing for 22-year-old Christopher Lee Cornell. U.S. District Judge Sandra Beckwith cautioned Cornell that she could reject the plea agreement depending on the findings of a presentencing report.

FBI agents arrested Cornell in the parking lot of a gun shop in suburban Cincinnati, saying he had just bought two M-15 semi-automatic rifles and 600 rounds of ammunition. They have said he planned to attack the Capitol with pipe bombs, then shoot people as they fled.

He was arrested Jan. 14, 2015, less than a week before Obama's scheduled address in Washington, which a federal terrorism task force detective said in court Monday was Cornell's intended timing for attack.

Last year, Cornell told WXIX-TV that he wanted to shoot Obama in the head.

Cornell's father had said his son was misled and coerced by "a snitch." Cornell's attorneys said Monday they would highlight the role of a government confidential informant at the sentencing hearing.

Federal investigators said Cornell made an Internet post after his arrest in which he identified the man he believed he was the informant and added personal details about him. They said he also appealed for other fighters to join a violent "jihad."

U.S. authorities have expressed deep concern over Islamic State militant efforts to recruit homegrown "lone wolf" terrorists.

Acting U.S. Attorney Benjamin C. Glassman praised the FBI and Assistant U.S. Attorney Timothy Mangan, saying their investigation and the plea agreement were "important to protect the public."

Glassman said the case underscored the need for the public to be alert to signs of potential conversions to support of terrorist groups.

"As you can see, people can be radicalized just by Internet," Glassman said. "It can happen anywhere."

Defense attorney Martin Pinales called Cornell "very fragile." Cornell has trimmed the long hair and beard he had when he was arrested and no longer insists on being called Raheel Mahrus Ubaydah, which he had adopted as his name.

"He has evolved. ... He has matured since his arrest," Pinales said.

Cornell replied firmly with "yes ma'am" when the judge asked him questions about his decision to change his pleas. His hands and ankles shackled, he at times chuckled nervously, and Pinales put his hand on his back in a calming gesture.

"We love Christopher very, very much and he has a lot of family and friends that support him," his father, John Cornell, said afterward.

Cornell pleaded guilty to attempted murder of U.S. officials and employees, to offering material support to a foreign terrorist organization, and to a firearms-related charge that carried a mandatory minimum sentence of five years and potentially up to a maximum of life in prison. Prosecutors are dropping a count of solicitation to commit a crime of violence.

Beckwith last year appointed Pinales and Candace Crouse to represent Cornell after a federal public defender asked to withdraw from the case. The same lawyers represented Michael Hoyt, a former Cincinnati-area country club bartender who was found not guilty by reason of insanity on a charge he threatened to kill then-Speaker of the House John Boehner.

The attorneys filed a motion last November saying there was "reasonable cause to believe" Cornell was mentally incompetent. However, Beckwith ruled in April he was competent for trial after hearing testimony.