Image copyright Getty Images Image caption The 25-year-old had unknowingly been communicating with undercover FBI agents

A former marine has been arrested by the FBI on suspicion of planning a terror attack in San Francisco over Christmas.

Everitt Aaron Jameson, 25, was held after allegedly discussing the plot with undercover FBI agents.

Criminal documents allege he planned to target the Pier 39 area, popular with tourists in the city.

Authorities say firearms, a will and a letter claiming the attack were found during a search of his home.

The FBI criminal complaint says that Mr Jameson's letter made reference to Donald Trump's decision to designate Jerusalem as the capital of Israel.

They say Mr Jameson came to their attention in September after expressing "radical jihadi beliefs" and support of so-called Islamic State through social media use.

The FBI complaint said he had expressed his support of attacks, including the October 31 truck attack in New York.

Mr Jameson allegedly named the San Francisco's Pier 39 as a target, an area popular for its restaurants, shops and resident sea lions, because "he had been there before and knew that it was a heavily crowded area".

Image copyright Getty Images Image caption The area is an attraction because of the sea lions that frequent Pier 39's famous K-Dock

Investigators allege Mr Jameson had expressed a will to use explosives in the attack to "tunnel" or "funnel" people into a smaller area to inflict casualties. The FBI says he sought materials that could be made into a pipe bomb from an agent.

But on 18 December Mr Jameson apparently hesitated, telling an agent: "I don't think I can do this after all. I've reconsidered."

A search warrant for his home was issued, where a number of firearms and related material was found.

He has been charged with attempting to provide material support to a foreign terrorist organisation.

Mr Jameson attended basic recruitment training for the US Marine Corps in 2009, but was reportedly discharged for not disclosing details of his asthma.