Enrique Marquez Jr pleaded guilty Tuesday night to supplying two assault rifles to the San Bernardino killers and plotting a 2011/12 attack that was canceled

Enrique Marquez Jr, a former neighbor of San Berndardino attacker Syed Rizwan Farook, has admitted in a plea agreement to providing Farook and his wife with the assault rifles they used to kill innocents.

Marquez, who converted to Islam in 2007, has admitted to supplying Farook and Tashfeen Malik with the guns that were used in the brutal slaying of 14 people at San Bernardino's Inland Regional Center in 2015.

'This defendant collaborated with and purchased weapons for a man who carried out the devastating December 2, 2015 terrorist attack that took the lives of 14 innocent people, wounded nearly two dozen, and impacted our entire nation,' US Attorney Eileen M Decker said in a statement, according to NBC.

In his plea agreement, Marquez admitted that he had made a 'straw purchase' of the DPMS model A-15 and the Smith & Wesson M&P-15.

He bought the guns because he and Farook had planned to carry out an attack on either the 91 freeway or Riverside Community College in 2011 or 2012, and he knew he would draw less attention than Farook.

They ultimately canceled the plans, but those guns ended up being used in the 2015 shootings.

Syed Farook and Tashfeen Malik (pictured) used the guns to shoot 14 people in Farook's office. Marquez and Farook had planned a different attack in 2011/12, but ultimately canceled it

Marquez and Farook's planned attack would have seen the pair using pipe bombs to disrupt traffic on the SR 91, The LA Times reported on January 2.

Farook would then have walked through the stationary traffic, shooting people in their cars.

When first responders arrived, Marquez then planned to gun them down from a vantage point.

They had also considered performing a similar attack on the nearby Riverside college, throwing pipe bombs into the cafeteria or library, then shooting people as they fled the building.

TIMELINE TO TERROR C. 2005 Enrique Marquez and neighbor Syed Rizwan Farook make friends as teenagers. 2007 Marquez converts to Islam. Initially, he and Farook discuss Islamic movements that reject violence, but Farook began to supply him with radical materials. 2009-2011 Marquez attends Riverside Community College. Farook was also there from 2004-2010. During this time they plot to attack either the college cafeteria or the 91 freeway with pipe bombs, then shoot fleeing victims and first responders. Nov 14, 2011 Marquez buys a Smith & Wesson M&P-15 rifle. Three months later he gets a DPMS model A-15. He buys the weapons for their attack, knowing Farook would stand out more. Nov 2012 Three men are arrested on suspicion of plotting the deaths of Americans in Afghanistan. This, and other reasons, cause Marquez to stop plotting with Farook. December 2, 2015 Farook and his wife, Tashfeen Malik kill 14 people and wound 22 more in an assault on Farook's workplace, San Bernardino's Inland Regional Center. They use the guns that Marquez bought in 2011. December 3, 2015 Marquez calls 911, saying he wants to kill himself because the guns can be traced back to him. He is admitted to a psychiatric ward in UCLA-Harbor Medical Hospital. December 3-13, 2015 Investigators interview Marquez, who they say is open and communicative, and repeatedly waives his Miranda rights. December 17, 2015 Marquez is arrested on charges of conspiring to provide material support to terrorists, making a false statement with the acquisition of firearms and fraud and misuse of visas, permits and other documents. February 14, 2017 Marquez signs a plea agreement in which he admits to providing the guns and lying when interviewed. He faces a mandatory maximum sentence of 25 years in prison. Advertisement

Their plan was canceled 'for a variety of reasons' including the November 2012 arrest of three members from an Inland Empire cell who plotted to kill Americans in Afghanistan. He stopped plotting with Farook around this time, he said.

On Tuesday Marquez also agreed to plead guilty to making false statements to authorities after they questioned him on suspicion of buying the assault rifles for the shooters.

He faces a mandatory 25-year maximum sentence as part of the deal when his case goes to court on Thursday.

Marquez was Farook's next-door neighbour and had known the killer since they were both teenagers.

In 2007 the seemingly mild-mannered Marquez converted to Islam and began to irregularly attend the Islamic Center of Riverside and the Islamic Society of Corona-Norco, where - as a young Latino - he stood out.

But Farook began to supply him with radical Islamic publications such as Al-Qaeda magazine Inspire, and the pair began to talk of guns and bombs, the LA Times reported.

Years on, the pair plotted and ultimately canceled their own attack, planned for 2011/12.

But the guns that Marquez bought for that attack were ultimately used in the December 2 San Bernardino shooting.

One day after the shooting, Marquez called 911, telling the operator that he was going to kill himself.

'What's wrong? Why do you feel like you want to kill yourself? What's going on?' the operator replied, according to a transcript presented in court.

'I don't know,' he said. 'My neighbor. He did the San Bernardino shooting. They can trace all the guns back to me.'

Marquez submitted himself to UCLA-Harbor Medical Hospital, where he was then placed in a psychiatric ward.

Investigators found and interviewed him there over the course of ten days. They told the court he had spoken openly and freely to them, and repeatedly waived his Miranda rights.

Marquez was not directly involved in the attack on the Inland Regional Center, where Farook worked.

The center, which helps people with disabilities, was holding a holiday luncheon and training session when the couple entered and began killing.

The couple were chased from the building by police and eventually cornered in a neighborhood around 1.7 miles away, where they were killed after exchanging five minutes of gunfire with 23 police officers.

He is in an alleged sham marriage with Mariya Chernykh, a Russian immigrant who supposedly paid him up to $10,000 to help her get a green card.

Syed Raheel Farook, brother of the San Bernardino shooter, pleaded guilty on January 10 to conspiring to commit immigration fraud by setting Marquez and Chernykh. She is currently out on bail.

Syed Raheel Farook himself is married to Mariya's sister, Tatiana, in what she admits is also a sham marriage.

Last Thursday she pleaded guilty to one felony count of conspiracy to commit immigration fraud and faces up to five years in prison, followed by deportation.