A U.S. federal grand jury Wednesday indicted on terrorism charges the friend and neighbor who bought the guns for a couple who massacred 14 people in California December 2.
Enrique Marquez faces up to 50 years in prison if convicted on all charges.
The charges include conspiring with terrorists, lying about the gun purchase, and immigration fraud for entering into a fake marriage.
The 24-year-old Marquez is being held without bail and will make his next court appearance January 6.
Marquez legally bought the weapons Syed Rizwan Farook and his Pakistan-born wife, Tashfeen Malik, used in the California massacre.
Investigators determined that he originally purchased the guns to use in a terrorist plot he and Farook allegedly drew up in 2012 to throw pipe bombs in a college cafeteria or library and shoot the students as they tried to escape.
The two also planned to drop bombs onto a California highway. Farook would walk from car to car through the stopped traffic, shooting people while Marquez shot at drivers and police from a hillside.
They gave up the plot when agents arrested other California suspects who planned to go to Afghanistan to kill U.S. soldiers.
Marquez was also indicted for lying about his intent for the weapons when he bought them, and entering into a sham marriage with a member of Farook's extended family with the sole purpose of helping the woman enter the United States.
Marquez was a friend and neighbor of Farook in Riverside, California. The two would spend hours together taking apart and fixing old cars, and talking about Islam.
Lost interest in Islam
Marquez had converted to Islam, but apparently lost interest in the religion. He had been working as a doorman in a bar and checked himself in at a mental-health clinic just after the massacre.
Farook and Malik murdered 14 people and wounded another 22 at a local government office in San Bernardino, east of Los Angeles December 2.
They also left behind a pipe bomb that failed to go off before they escaped in a car to nearby Riverside. They were killed in a gun battle with police, leaving behind thousands of rounds of ammunition and bomb-making materials in their house.
The couple were apparently followers of the Islamic State group.
The FBI said the pair made a commitment two years ago to launch an attack even before they met in person and married.
But there is still no evidence they were part of a foreign terrorist group or an organized terrorist cell.