Friend of San Bernardino shooter arrested and charged

US authorities arrested and charged Thursday a man who allegedly bought the assault rifles used by Syed Farook and his wife to kill 14 people in the San Bernardino mass shooting earlier this month, justice officials said.

Enrique Marquez, 24, who had been cooperating with authorities, was charged with conspiring with Farook - a longtime friend and former neighbour - to commit crimes of terrorism in 2011 and 2012, though those plots were never carried out.

Marquez was also charged with the unlawful purchase of the two assault rifles used in the shooting on December 2 carried out by US-born Farook and his Pakistani wife Tashfeen Malik, in what the FBI is investigating as a terrorist attack.

The three-count criminal complaint also charged Marquez with defrauding immigration authorities by entering into a sham marriage with a member of Farook's family, US Attorney for the Central District of California, Eileen Decker, said in a statement.

Marquez was arrested by special agents with the Federal Bureau of Investigation and was expected to make an initial court appearance later Thursday.

"Mr. Marquez conspired with Mr. Farook to commit vicious attacks," said Decker.

"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."

There was no evidence Marquez took part in the December 2 attack on a holiday party at a social services centre - which left 22 wounded - or had advance knowledge of it, said Decker.

However, she added: "His prior purchase of the firearms and ongoing failure to warn authorities about Farook's intent to commit mass murder had fatal consequences."

Marquez was also alleged to have bought the explosives that were used to construct a pipe bomb in the December 2 attack.

Farook and his wife Tashfeen Malik, committed Muslims who had a baby daughter, were killed in a gun battle with police following the shooting.

Details are emerging of Marquez and his relationship to the killers.

He checked himself into a mental health facility after the massacre and posted a cryptic message on Facebook that said, "I'm very sorry guys. It was a pleasure," the Los Angeles Times reported.

Marquez had been working as a security guard at Wal-Mart and was known for his shy and mild-manned demeanour.

He was described as both impressionable and the type of guy who "couldn't fight his way out of a wet paper bag," the owner of a bar where he used to work told the paper.

A friend from college who bonded with Marquez over their joint desire to enlist in the military described him as initially guarded but warm and funny once he got comfortable with people.

Viviana Ramirez, 23, told the Times she did not believe Marquez would have helped Farook if he had known about the scheme.

"He's never done anything mean," she said. "He is a really good person." Federal agents are also looking into his marriage to Mariya Chernykh, a Russian immigrant whose sister is married to Farook's older brother.

Friends and neighbours described the marriage as atypical: he was living with his parents and she was living with her sister and brother-in-law.

"He would never leave with her, come with her, not hug her," neighbour Brittani Adams, 24, told the Times.

"The whole thing is very, very weird." Marquez began attending prayers at the Islamic Society of Corona-Norco about four or five years ago, according to Yousuf Bhaghani, president of the facility's board of directors.

While Marquez was not a regular, he stuck out because of his Latino background. Bhaghani described him as "a decent guy who came to pray, nothing that could raise any flags."