According to an FBI document, the two men met in 2005 when Marquez became Farook's neighbour in Riverside, California.
Prosecutors said Farook introduced Marquez to radical Islamist ideology - and by 2011 Marquez was spending most of his time at Farook's home listening to lectures and watching videos with extremist content.
The pair began planning savage gun and bomb attacks, according to the document, with Marquez telling investigators their targets included the library or cafeteria at Riverside Community College - where they had both been students.
The pair also allegedly planned to detonate pipe bombs on a busy highway during rush hour traffic and then shoot at law enforcement and emergency crews as they arrived.
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 US-born son of Pakistani immigrants, "looked Middle Eastern”.
The document detailed how Marquez also purchased explosives, specifically smokeless powder, as part of the pair's plans "to create bombs and commit mass killings”.
Early in 2012, the two men continued to prepare by visiting shooting ranges.
After that year, prosecutors said, Marquez distanced himself from Farook and stopped plotting with him.