The man accused of purchasing two of the guns used in the San Bernardino shooting rampage will remain in custody as a criminal case against him proceeds, a federal judge ruled Monday.

Enrique Marquez has lived with his mother and stepfather for the last 10 years and does not own a passport, but U.S. District Magistrate Judge David Bristow said a conspiracy Marquez allegedly plotted with one of the shooters was enough to keep him in federal prison as his case is heard.

“The gravity of such conduct,” Bristow said, “is such that at this point of time the defendant has not rebutted the argument that he is a danger to the community and he continues to pose that danger,” the Los Angeles Times reported.

Marquez, 24, is accused of plotting at least two other assaults, in 2011 and 2012, with Sayed Farook that were not carried out. Farook and his wife, Tashfeen Malik, died in a shootout with police following the Dec. 2 attack that left 14 people dead and more than 20 wounded.

Prosecutors say Marquez immersed himself in radical ideology shortly after meeting Farook in 2005 while the two lived in Riverside. And by 2011, according to court documents, Marquez and Farook supported the militant rhetoric of now-deceased al-Qaeda cleric Anwar al-Awlak.

The three-count indictment includes charges of providing material support to terrorists, making false statements in acquiring the firearms and immigration fraud.

Marquez is not charged with involvement in the San Bernardino attack. But according to court documents, Marquez allegedly told investigators that he and Farook planned to assault the library or cafeteria of the Riverside Community College where both had been students.

A second plot, which Marquez allegedly described in extensive interviews with federal investigators, involved lobbing pipebombs at motorists during rush-hour on California State Route 91, which services the greater Los Angeles area. The plot then called for the two to open fire on the stranded motorists. Marquez allegedly told investigators that part of the plot, which also was not carried out, called for him to target law enforcement officers from a nearby hillside as they came to assist.

“Even though these plans were not carried out, Mr. Marquez’s criminal conduct deeply affected San Bernardino County, Southern California, and the entire United States when the guns purchased by Marquez were used to kill 14 innocent people and wound many others,” U.S. Attorney Eileen M. Decker said in announcing the charges last week.

Marquez’s next court appearance is scheduled for Jan. 4.

According to an affidavit in Marquez’s case, a day after the attack, he called 911 and told an operator that he wanted to kill himself. “My neighbor. He did the San Bernardino shooting,” Marquez said, according to a transcript. “They can trace all the guns back to me.”

Shortly afterward, Marquez was admitted to the emergency room at UCLA-Harbor Medical Center and referred to the psychiatric ward, the Times reported.

Contributing: Greg Toppo, USA TODAY