A court filing unsealed Friday says prosecutors allege that Amer Sinan Alhaggagi also met with undercover agents "to plan a potential terrorist attack."
Alhaggagi, an Oakland, California, resident, has been in federal custody since November on unrelated charges.
His lawyer tells the San Francisco Chronicle that the latest allegations are baseless and stem from idle talk in late-night internet chat rooms.
A federal indictment charges Alhaggagi with attempting to provide material support or resources to a foreign terrorist organisation.