RIVERSIDE, Calif. - The gunman who killed his coworkers in San Bernardino, Calif., and the friend who bought the assault rifles used in the shooting were related through marriage and may have plotted an attack together three years ago.

New revelations from officials and public records show a much deeper connection between Syed Rizwan Farook and Enrique Marquez than previously was disclosed. Marquez Marquez purchased high-powered weapons at least three years ago that Farook and his wife used to open fire on a holiday gathering of Farook's fellow health inspectors Dec. 2, killing 14 people. The FBI has said that Farook's wife declared her allegiance to the Islamic State in a Facebook posting shortly before the attack.

Farook, 28, and his wife, Tashfeen Malik, 29, were killed hours later in a shootout with police, leaving behind a 6-month-old daughter.

Couple's radicalization

FBI Director James Comey told the Senate Judiciary Committee on Wednesday that the two shooters were radicalized well before Malik came to the United States on a fiancee visa and they had discussed jihad and martyrdom as early as 2013.

Investigators are trying to determine if Farook's path toward extremism predated that time and whether it led to plans to launch an attack in 2012, according to two people familiar with the investigation who were not authorized to discuss the matter publicly and spoke on condition of anonymity.

Marquez and Farook "were plotting an actual attack" that year, including buying weapons, but became apprehensive and shelved the plan because of law enforcement activity and arrests in the area, said Idaho Sen. Jim Risch, a Republican who sits on the Senate Select Committee on Intelligence.

Marquez, 24, spoke with federal authorities after they raided his mother's Riverside house over the weekend. He and Farook were friends for years and became family last year with a sister-in-law in common.

Marriage witnesses

The two men were listed as witnesses on the marriage license when Farook's brother, Raheel, wed a Russian woman in 2011.

Three years later, Raheel Farook and his wife, Tatiana, were witnesses to Marquez's marriage to her sister, Mariya Chernykh, according to Riverside County records.

The ceremony took place at the Islamic Society of Corona-Norco, according to the marriage license, though the mosque's facility manager denied it occurred there.

Azmi Hasan said Wednesday that he understood Marquez had converted to Islam but said he was not a member of that mosque. Marquez had only worshipped there three to four times over seven years, said Hasan, who had not seen him in about four years.

Marquez had a security guard license in California for several years, but it expired last year. He had worked at Wal-Mart since May but has since been fired, spokesman Brian Nick said.

He spoke of wanting to join the military, Viviana Ramirez, 23, a fellow student at Riverside Community College told the Los Angeles Times.

Marquez rarely spoke about his family or his marriage, Ramirez said.

Tommy Lopez, who said he became friends with Marquez after meeting at a punk rock show seven months ago, said he never talked about his wife and was not religious.

He last saw Marquez in the last month or so when Marquez fell asleep at a friend's house and they stacked beer cans on his body.

"When he woke up, he just started laughing," Lopez said. "He was a pretty laid-back guy."