SAN FRANCISCO (AP) — The FBI arrested a San Jose man as he went through the motions of detonating what he believed to be a car bomb in front of a Northern California bank, federal authorities said Friday.

FBI agents arrested Matthew Aaron Llaneza, 28, Thursday night near a Bank of America branch in Oakland as part of a sting operation.

Llaneza had minutes earlier parked an SUV in front of the bank believing the vehicle contained an explosive rigged to detonate from a cellphone command, authorities said. Llaneza was arrested as he stood nearby and tried to detonate the device with a cellphone.

The FBI says Llaneza expressed support for the Taliban and had hoped the bombing would be blamed on anti-government activists and would somehow spark a civil war after a severe government crackdown. The FBI said Llaneza expressed a desire to travel to Afghanistan to train Taliban fighters.

He is a convert to the Islam religion who was once involuntary placed in a psychiatric unit by police, officials said. He told police he is a high school graduate who last worked as a window washer in 2010, according to Santa Clara County court records. His father told police that Llaneza had been "kicked out" of the U.S. Marine Corps but he didn't know the reason.

The FBI says that on Nov. 30, Llaneza first met with an undercover agent he believed to be connected to the Taliban and the mujahidin in Afghanistan. That's when he allegedly laid out his plan to bomb a financial institution.

The two met three more times in December to finalize the plan, according to an affidavit written by FBI agent Christopher Monika. Monika said the FBI rented a storage unit in Hayward and "positioned a sports utility (SUV) in it for its use as the delivery vehicle for the car bomb."

On Jan. 26, the two constructed the "bomb" by pouring chemicals purchased and mixed by the FBI into 12 five-gallon buckets in the rear of the SUV. Llaneza purchased two cellphones, an LED light, a 9-volt battery and a "battery snap cap" to construct the device. The undercover agent rigged one of the cellphones to serve as the trigger. The FBI says the device was inert and never in danger of exploding.

Story continues

They met one more time Feb. 2 to make sure the trigger worked, and they connected the blasting cap and the trigger to the device.

Llaneza's arrest is the latest in a string of FBI stings that have ensnared would-be jihadists allegedly bent on domestic terrorism.

On Jan. 31, a Portland, Ore., jury convicted Mohamed Mohamud, 21, of attempting to bomb a Portland Christmas tree-lighting in November 2010 with a dummy device provided by undercover agents. In October, the FBI arrested Quazi Mohammad Rezwanul Ahsan Nafis, 21, after he tried to detonate a dummy 1,000-pound bomb supplied by the FBI in front of the New York Federal Reserve Bank in Manhattan.

Llaneza appeared in federal court Friday without entering a plea to one charge of attempted use of a weapon of mass destruction against property. He remains in custody and faces a life sentence if he's convicted.

Llaneza previously served about half of a one-year jail sentence in Santa Clara County for illegally transporting an assault weapon and possessing a magazine that held 30 bullets. Magazine that hold more than 10 bullets are illegal in California.

In early 2011, Llaneza traveled in a recreational vehicle from his mother's home in Mesa, Ariz., to his father's home in San Jose, according to court records.

On April 17, 2011, his father called 911 to report his son had consumed a large quantity of alcohol and was displaying combative and bizarre behavior. He battled with responding paramedics in a bedroom, at one point yelling "Allah Akbar," before he was put in a "four points" restraint and taken to the hospital, according to a San Jose police report.

Police were called to the hospital and he made several bizarre and nonsensical claims, and the police officers detained him on a "mental health hold" in a psychiatric unit.

The next day, police talked to Llaneza's father at his San Jose home, according to court records. He told police his son had converted to Islam and that he was associated with Muslim friends, according to court documents. He lists an alias of "Tariq Solamin," the document showed. His father acknowledged he was "deeply concerned" about his son's mental state and then turned over an assault rifle and three loaded magazines, "banana clips," for the AK-47.

Police found a journal with some alarming writings in the recreational vehicle, said Santa Clara County Deputy District Attorney Alaleh Kianerci.

"There was a lot of gibberish and random thoughts," Kianerci said. "There were some definite mental illness issues."

Llaneza ultimately pleaded guilty to two felony counts on Oct. 11, 2011, 10 days after California's controversial jail realignment law went into effect. The new law shifted the responsibility for housing many non-violent offenders from prisons to jails, dramatically cutting incarceration times for many.

At the time of his sentencing on Nov. 3, 2011, Llaneza faced six years in prison. Instead, a judge sentenced him under the new law to one-year in jail, which was automatically cut in half. He was released later that same month.

Llaneza's father, Steve Llaneza, didn't return messages left at his home and on a cellphone.