WASHINGTON/RIVERSIDE, Calif. (Reuters) - A former neighbor accused of supplying assault rifles to the couple who massacred 14 people in San Bernardino, California, appeared in court on Thursday charged with conspiring to provide material support to terrorists.

Enrique Marquez, 24, a friend of Syed Rizwan Farook, 28, who launched the Islamic State-inspired rampage on Dec. 2 with his wife, Tashfeen Malik, 29, also told investigators he and Farook plotted earlier mass casualty attacks, prosecutors said.

U.S. Attorney Eileen Decker said the two men conspired to commit “vicious” assaults on targets including a California community college and a state highway during rush hour.

“Even though these plans were not carried out, Mr. Marquez’s criminal conduct deeply affected San Bernardino ... and the entire United States when the guns purchased by Marquez were used to kill 14 innocent people and wound many others,” Decker said in a written statement.

Decker said there was no evidence that Marquez took part in Dec. 2 attack or had prior knowledge of it.

Wearing handcuffs and beige T-shirt, Marquez appeared in federal court in Riverside, California for a brief hearing on Thursday. He did not enter a plea.

The possibility of bail will be discussed on Dec. 21, and a preliminary hearing was scheduled for Jan. 4. Marquez faces up to 35 years in prison if convicted on three separate counts.

According to an FBI affidavit, the two men met in 2005 when Marquez became Farook’s neighbor in Riverside, California.

Farook introduced Marquez to radical Islamist ideology, prosecutors said, and by 2011 Marquez was spending most of his time at Farook’s home listening to lectures and watching videos with extremist content.

Slideshow ( 3 images )

At that point, the pair began planning gun and bomb attacks, the affidavit said, and Marquez told investigators their targets included the library or cafeteria at Riverside Community College, where they had both been students.

He and Farook also planned to detonate pipe bombs on State Route 91 during afternoon rush hour, and then to shoot at law enforcement and emergency crews as they arrived, according to the affidavit.

Prosecutors said the pair bought guns, ammunition and tactical gear, and Marquez told investigators he agreed to purchase the weapons because “his appearance was Caucasian,” while Farook, the U.S-born son of Pakistani immigrants, “looked Middle Eastern.”

He bought a Smith and Wesson M&P-15 Sport rifle in November 2011 and a DPMS model A-15 rifle in February 2012, each costing about $750, according to the affidavit.

Marquez also purchased explosives, specifically smokeless powder, as part of the pair’s plans “to create bombs and commit mass killings,” the affidavit said.

Early in 2012, the two men continued to prepare by visiting shooting ranges. After that year, prosecutors said, Marquez distanced himself from Farook and ceased plotting with him.

MARQUEZ CALLED 911 AFTER MASSACRE

The FBI affidavit provided more details on how investigators believe Farook and his wife’s rampage unfolded.

Slideshow ( 3 images )

According to prosecutors, Farook went to his co-workers’ holiday party and placed a bag containing a pipe bomb on a table, before the couple returned and opened fire. It never went off, but a remote control detonator was found in their car after they were killed in a shootout with police.

The affidavit said Marquez told investigators he and Farook learned to make improvised explosive devices from Inspire Magazine, the official publication of Al-Qaeda in the Arabian Peninsula (AQAP).

Hours after the massacre, the affidavit said, a distressed Marquez called 911 to say he wanted to kill himself, and that Farook had used a weapon bought by Marquez.

“They can trace all the guns back to me,” Marquez told the operator.

He was also charged with defrauding U.S. immigration authorities by entering into a sham marriage with a Russian woman in Farook’s extended family so she could live in the United States, prosecutors said.

Marquez, who had checked himself into a Los Angeles-area psychiatric facility shortly after the shootings, had several connections to Farook and Malik and quickly became a key figure in the investigation of the shootings.

The Federal Bureau of Investigation, which is treating the attack as terrorism, raided his home and questioned him for several days. Sources said Marquez cooperated during their interviews.

In 2014, state records showed, Marquez married a Russian woman who was the sister of Farook’s older brother’s wife. Neighbors said they were surprised to learn he had been married, having never seen him with a woman. Prosecutors say Marquez was paid $200 per month for his role in the fraud.

The FBI said Farook and Malik were supporters of Islamic State, the violent group that has taken over large parts of Syria and Iraq, and that they had discussed martyrdom online before they even met.

Their attack thrust the issues of national security and Islamic State into the U.S. presidential campaign, and it came just weeks after Islamic State-affiliated gunmen and suicide bombers killed 130 people in a series of attacks in Paris.

President Barack Obama is due to travel to San Bernardino on Friday to meet privately with families of the victims.