A California man has been indicted on a charge of plotting to use homemade bombs during a Christmas Day attack on San Francisco's Pier 39.
Everitt Aaron Jameson intended to use pipe bombs to funnel people into an area of the popular tourist destination in order to shoot them, the indictment alleges.
The indictment replaces a criminal complaint against Jameson, 26, a Modesto tow-truck driver, but keeps the original charge of attempting to aid a terrorist organisation.
The FBI arrested Jameson three days before Christmas after he talked about his plans to undercover agents, including one he thought was associated with the Islamic State group.
The indictment and a previously released FBI affidavit say he described to agents how to build pipe bombs, described where he intended to assemble the bombs, asked for remote timers, and described how he intended to use the bombs "to funnel people into an area in order to shoot them".
Assistant federal defender Charles Lee said he had not been presented with the evidence and that his office would investigate the possibility of using a defence of entrapment.
Mr Lee said the FBI found no bomb-making materials when they searched the home of Jameson, and that two rifles and a handgun were legally owned by a relative and were locked in a gun case where Jameson could not get them.
He said the federal charges are built only on statements his client posted on his Facebook page.
Mr Lee added that his client told the FBI undercover employee: "I also don't think I can do this after all. I've reconsidered."
Jameson was discharged from the Marine Corps after little more than four months in 2009 for failing to disclose a history of asthma.
The FBI affidavit said he asked for a fully automatic assault rifle and noted that he earned a sharpshooter qualification.
That is a basic marksmanship qualification and Jameson was never trained as a sniper during the brief time he spent at Camp Pendleton, California, said Marine spokeswoman Yvonne Carlock.
Jameson is set for a court hearing on Friday in federal court in Fresno, California.
Federal Magistrate Judge Erica Grosjean last week ordered him detained without bail in part because he has no substantial known financial resources.