Marquez, 24 was charged Thursday with conspiring with Farook to provide material support to terrorism, making a false statement in connection with the acquisition of firearms, and immigration fraud, according to a statement from the Department of Justice.
Authorities say Marquez and Farook had known each other for years, and had even discussed, in detail, plans to carry out terror attacks that never materialized.
He is believed by authorities to have bought two semi-automatic rifles used by Farook and Farook's wife, Tashfeen Malik, in the December 2 mass shooting and terror attack that left 14 people dead in the Southern California city.
Marquez has told investigators he didn't know about the plans for that attack, U.S. officials have said. The complaint against him doesn't allege Marquez was involved, either.
But authorities do say he bought the two rifles eventually used in the shooting, apparently in preparation for terror attacks that never happened -- one against a community college Marquez and Farook had once attended, the other on a busy roadway.
Federal authorities also accused Marquez of buying explosive material later used in the San Bernardino attack.
"Mr. Marquez conspired with Mr. Farook to commit vicious attacks, as set forth in today's charges," said U.S. Attorney Eileen M. 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."
He's also accused of entering a sham marriage with a member of Farook's family, according to the complaint.
911 call: 'They can trace all the guns back to me'
Since the San Bernardino shootings, Marquez has waived his Miranda rights, cooperated with investigators and provided information, officials have said. He also checked himself into a mental health facility.
According to the complaint, Marquez called 911 on December 3. He told the operator that Farook was behind the San Bernardino attack.
"The f****** a****** used my gun in the shooting," Marquez said. "They can trace all the guns back to me."
When asked how Farook got his gun, Marquez said that he'd given it to him for safe storage, the complaint read.
"To me, he was reliable enough for him for storage, like to store my gun," Marquez allegedly told the operator.
Farook and Malik opened fire on Farook's co-workers at a work event December 2. Police shot and killed them hours later.
The massacre was a terror attack, authorities have said. Both U.S.-born Farook and Pakistan native Malik expressed commitment to Islamic jihad and martyrdom in direct, private online messages in late 2013, months before Malik moved to the United States to live with Farook, FBI Director James Comey has said.
Malik also pledged allegiance to ISIS leader Abu Bakr al-Badghadi in a Facebook post as the San Bernardino attack was happening, three U.S. officials familiar with the investigation told CNN.
Authorities still are trying to learn more about whom the killers interacted with, how they hatched and carried out the plot and why.
Rifles and pipe bombs
Marquez's path to involvement began, investigators say, in the garage of Farook's home on Tomlinson Avenue in Riverside back in 2004 or 2005.
That's where the two became friends, and Farook began introducing Marquez to Islam.
Towards the end of 2005, Marquez visited a mosque in Corona, California, and began to spend more time next door at Farook's home, praying and discussing an increasingly radical form of Islam.
By 2011, Farook and Marquez were spending most of their time at Farook's home, reading, listening to lectures and watching videos "involving radical Islamic content," investigators say.
It was then that they began talking of using guns and bombs to attack targets in southern California, including the community college they had once attended together.
Marquez allegedly told investigators their plan was to drop pipe bombs from the second floor of the cafeteria, then escape and mount another attack elsewhere on campus.
They also talked about hitting busy SR-91 during rush hour, investigators say, citing interviews with Marquez after the San Bernardino attack. They would toss pipe bombs into traffic, disabling vehicles with the explosions, then shoot into the trapped cars, Marquez allegedly told investigators.
Their discussions became action in 2011, investigators say, with a decision for Marquez to buy two rifles for use in the attacks. He was chosen, investigators say, because his Caucasian appearance would draw less attention.
The two made multiple trips to gun ranges to practice shooting, according to the complaint.
He later bought smokeless powder found in one of improvised explosive devices found at the scene of the San Bernardino attack, investigators say.
Marquez has told investigators that he used to build pipe bombs with Farook, portraying himself and his friend as hobbyists experimenting with building the devices, law enforcement officials said.
By the last half of 2012, however, it seems their plans had lost momentum.
According to the complaint, which cited Marquez, their contact started to decline after 2012, and they stopped planning attacks together. Marquez, according to the complaint, said he was spooked by the arrests of four Southern California men
accused of conspiring to provide material support to terrorists.
Marquez, a state-licensed security guard until his license expired last year, said he had nothing to do with the pipe bombs that authorities found at Farook's home after the December 2 attack, or the ones that apparently failed to go off at the site of the shooting, the officials said.
Neighbors: They worked on cars together
Talking to CNN last week, neighbors of the Riverside homes where Marquez and Farook lived next door to one another recalled the two working on cars together but did not know their relationship extended beyond that shared interest.
As for the killers, the bodies of Farook and Malik were buried Tuesday, 13 days after the attacks, according to the Law Offices of David S. Chesley, the California attorney who represents Farook's family. A funeral for the couple Tuesday in Rosamond, north of Los Angeles, was attended by family members and "very few" friends, a source told CNN on condition of anonymity.
President Barack Obama is expected to travel to San Bernardino on Friday
to meet privately with families of the victims of this month's attack.