The FBI has arrested a man in Ohio for allegedly planning to attack the US Capitol in Washington in an Islamic State-inspired attack.
Christopher Cornell has been charged with attempting to kill a US government officer, according to court documents.
He came to the attention of the FBI after tweeting support for extremist groups like Islamic State.
The public was never in danger during this investigation, Cincinnati Special Agent in Charge John Barrios said.
Mr Cornell, 20, was arrested after purchasing firearms on Wednesday, but had long been tracked by an undercover agent.
He allegedly operated a Twitter account under the alias Raheel Mahrus Ubaydah, which came to the attention of the FBI through a confidential source in August.
The source had been co-operating with the FBI in exchange for favourable treatment in an unrelated case, court documents said.
Mr Cornell allegedly told the source he had not been directly authorised by Islamic State leaders overseas to undertake attacks but wanted to “wage jihad under our own orders”.
During a meeting in October, according to the criminal complaint, Mr Cornell told the source they needed weapons but did not want to share details of his plan.
At a second meeting, Mr Cornell allegedly told the source they would go to Washington, set off pipe bombs at the Capitol building and then shoot employees and officials there.
He was arrested by the FBI Joint Terrorism Task Force after buying two M-15 semi-automatic rifles and 600 rounds of ammunition in Ohio.