LOS ANGELES — A former security guard who bought the assault rifles used by his friend in the San Bernardino massacre is expected to be charged as early as Thursday, according to two law enforcement officials.

The specific federal charges against Enrique Marquez, 24, were not immediately clear. The officials were not authorized to discuss the charges by name and spoke on condition of anonymity.

Marquez legally purchased the high-powered weapons used by Syed Rizwan Farook and his wife, Tashfeen Malik, to kill 14 people at a holiday gathering of Farook’s health department co-workers on Dec. 2. The couple also injured 22 others before dying hours later in a shootout with police.

Authorities previously said Marquez legally bought the rifles at least three years ago, but they did not say how Farook and his wife got them.

The FBI is investigating the rampage as an act of terrorism and said the Muslim couple were radicalized before they met online and communicated privately about jihad and martyrdom before they married.

President Barack Obama said he was briefed on the investigation Thursday and reiterated the federal government’s commitment to find answers to all the unknowns in the case. He made no mention of any charges being filed.

advertisement | advertise on newsday

Investigators also were exploring whether Farook and Marquez aborted plans to launch an attack in 2012. They “were plotting an actual attack” that year, including buying weapons, but became apprehensive and shelved the plan because of arrests in the area, according to Idaho Sen. Jim Risch, a Republican on the Senate Select Committee on Intelligence.

Marquez had deep ties with Farook that extended to a family connection. The two grew up next door to each other in Riverside and then became related through marriage.

Both men were witnesses at the wedding of Farook’s brother, Raheel, to a Russian woman in 2011, according to Riverside County marriage records.

Last year, Marquez married the sister of Raheel Farook’s wife. That made Marquez and Raheel Farook brothers-in-law and gave Marquez and Syed Rizwan Farook a sister-in-law in common.

Records show that Marquez married Mariya Chernykh at a ceremony at the Islamic Society of Corona-Norco, though the mosque’s facility manager denied it occurred there.

@Newsday

Marquez was said to be a convert to Islam but was not a member of that mosque, Azmi Hasan said. Marquez worshipped there three to four times over seven years, Hasan said.

Right after the shooting, Marquez called his mother to say he was safe but that he wouldn’t be coming home, neighbor Lorena Aguirre said. He later checked into a mental health facility.

Three days after the attack, federal agents raided his mother’s house in Riverside, a city near San Bernardino that is about 60 miles east of Los Angeles.

Armida Chacon has said her son is a good person who loved to hang out with friends and go to parties, according to The Los Angeles Times.

“I don’t know how this happened. ... My world is upside-down,” she said tearfully.

advertisement | advertise on newsday

When asked about Syed Farook, she said her son was friends with him and “nothing more.”

Marquez’s friends were shocked to learn he was linked to the attack by the weapons and described him as a friendly, easygoing guy who was not religious and rarely discussed his family or marriage.

“I still can’t believe this is going on,” said Viviana Ramirez, who met Marquez through an online forum when they studied at Riverside Community College. “I just want people to know he’s not a bad person.”

Marquez was a licensed security guard for several years, but his license expired at the end of 2014. He was hired to work at Wal-Mart in May but has since been fired, a company spokesman said.