FBI officials arrested and charged an ex-Marine accused of plotting a Christmas Day terrorist attack on San Francisco’s Pier 39 on behalf of Islamic State (ISIS). Undercover FBI agents were key elements of the plot.

Everitt Aaron Jameson, 26, also known as Abdallah al-Amriki, is accused of providing "material support or resources to a foreign terrorist organization" and being willing to do "do anything for the cause,” according to an affidavit by FBI special agent Christopher McKinney, filed before a federal magistrate in Fresno, California.

A resident of Modesto, California, Jameson was in contact with two FBI informants, one of whom he believed was associated with Abu Bakr al Baghdadi, the leader of Islamic State (IS, formerly ISIS/ISIL).

Man plotting Christmas attack in San Francisco in support of ISIS has been thwarted by the FBI. https://t.co/wFKp0SGYPvpic.twitter.com/lXzQxqS1Xv — Ninja Economics (@NinjaEconomics) December 22, 2017

An employee of a local tow truck company, Jameson said he would carry out a vehicle attack on San Francisco’s Pier 39 because he "had been there before and knew it was a heavily crowded area.”

However, the court documents reveal that Jameson backed out of the attack on December 18, during the plotting stage, when one of the undercover FBI operatives tried to arrange a meeting. James told the undercover agent he was “very busy tonight.”

"I also don't think I can do this after all," Jameson wrote. "I've reconsidered."

“We only can do Allah’s will,” the agent replied.

"Inshallah [God willing] one day I can. But I can't,” Jameson said.

VIDEO: Father of foiled terror attack suspect: 'Unreal, I really couldn't believe it' Full interview --> https://t.co/sGP5s1E8blpic.twitter.com/jFr9UMpqau — ABC30 Fresno (@ABC30) December 22, 2017

The would-be attacker was described as a former US Marine Corps recruit who attended training in 2009 and earned a “sharpshooter” rifle qualification, according to the affidavit. He was discharged from the Corps after he failed to report that he had asthma.

Just spoke w/suspect's estranged wife's grandfather who raised her, says she is prison and that the state took the couple's two kids (p.1) pic.twitter.com/OylnbD9FvV — Melanie Woodrow (@MelanieWoodrow) December 22, 2017

Jameson converted to Islam two years ago, calling himself Abdallah adu Everitt ibn Gordon al-Amrik, the affidavit said. He attended the Merced Islamic Center “two or three times to worship by himself, but nobody there really knew him on a personal level,”according to KNSD-TV.

What agents recovered at suspect's home - letter, last will & testament, firearms and rounds pic.twitter.com/NbmcUgHDfW — Melanie Woodrow (@MelanieWoodrow) December 22, 2017

FBI officials searched his residence on December 20, finding two .45 caliber magazines (one of which was empty), four cylinder fireworks, one Winchester .22 caliber rifle, one Rugers model M77, an ammunition holder containing six rounds, one Sturm Ruger model handgun, and one empty handgun magazine.

An FBI informant told officials that Jameson was "liking" and "loving" Facebook posts that were "pro-ISIS and pro terrorism," including one that featured an image of Santa Claus in New York City with dynamite. Jameson was alleged to have drawn inspiration from the October 31 attack in New York City that killed eight people, as well as the December 2, 2015 San Bernardino attack that killed 14.