A California man was charged Friday with plotting to aid ISIS by traveling to Syria or staging an attack in San Francisco on Christmas Day, though court documents suggest he later got cold feet.

Everitt Aaron Jameson, 26, of Modesto was arrested earlier in the day and charged with providing support to a terrorist organization. Law enforcement officials say the FBI began investigating him in September, after a tipster reported that Jameson was making pro-jihadi comments in a Facebook posting.

Court documents said when undercover FBI informants and employees began communicating with him in October, he praised ISIS and the deadly Oct. 31 truck attack on a New York City bicycle path.

Investigators said he told them he had the money it would take to go to Syria to join ISIS but later he began to talk about carrying out some kind of attack in the U.S., using skills he learned in the Marine Corps.

The FBI said he eventually began talking about attacking Pier 39 in San Francisco, a popular tourist attraction, because he knew it to be a crowded area. Court documents said he told the undercover operatives that he had no escape plan because he was ready to die.

Related: ISIS weapons arsenal included some purchased by U.S. government

Investigators said he asked for help in obtaining a semiautomatic rifle and materials to make a bomb and thought Christmas would be a good time to attack. Law enforcement officials said those materials were never provided.

Screenshots from the Facebook page of Everitt Aaron Jameson show some of his recent posts. Facebook

But by mid-December, investigators said, he decided against it, telling them, "I also don't think I can do this after all. I've reconsidered."

Court filings said a search of his house turned up three firearms, a few fireworks, and apparent suicide martyrdom letter, dated Dec. 16, in which he called the U.S. "nationalistic" and "Godless" and complained about President Trump's decision to recognize Jerusalem as the capitol of Israel.

A senior law enforcement official suggested Friday that Jameson may have decided not to continue with his plot after an FBI employee in Washington, D.C., mistakenly dialed his cell phone number and ended the call when Jameson answered. Jameson called back and got the employee's voice mail, which gave only a name.

San Francisco police said Friday that even before the plot came to light, they had stepped up security for the holidays.