Aftermath of San Bernardino massacre
Aftermath of San Bernardino massacreReuters

Enrique Marquez, a friend of the man behind this month's attack in California, has been arrested in connection with the massacre that left 14 people dead, AFP reported on Thursday.

Marquez, 24, who has reportedly been cooperating with authorities, legally purchased the two rifles used in the San Bernardino attack by Syed Farook and his wife Tashfeen Malik, authorities have said.

It is believed he purchased the weapons on behalf of Farook, who did not want them traced to him and feared he would not pass a background check. Shortly after the massacre, the FBI raided Marquez’s Riverside home.

The Los Angeles Times said Marquez, a longtime friend and former neighbor of Farook, would likely face criminal charges stemming from the December 2 assault that also left 22 people wounded.

Several reports said he could be charged as early as Thursday.

Marquez, who was also connected to Farook through marriage and who had converted to Islam, 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 Times reported.

Farook and his wife, who had a baby daughter, were killed in a gun battle with police following the shooting, which is being investigated as a terrorist attack.

The FBI has said that Farook and Malik were both radicalized "for quite some time" and had taken target practice at Los Angeles-area shooting ranges, and once "within days" of the massacre.

It is believed Farook had contact with people from at least two terrorist organizations overseas, and investigators have also said Malik had pledged allegiance to the Islamic State (ISIS) group in a Facebook posting.