LOS ANGELES — A man accused of buying high-powered rifles used in the San Bernardino terror attack has agreed to plead guilty to federal criminal charges, court documents released Tuesday say.

The documents say Enrique Marquez Jr., 25, of Riverside has agreed to plead guilty to conspiring to provide material support to terrorists and lying about the acquisition of weapons used in the San Bernardino killings.

Prosecutors say Marquez acknowledged plotting with Syed Rizwan Farook in 2011 and 2012 to massacre college students and gun down motorists on a gridlocked freeway. Those attacks never occurred.

Authorities said Marquez purchased the guns used by Farook and his wife, Tashfeen Malik, in the Dec. 2, 2015, attack in San Bernardino in which 14 people were killed at a public health agency event before the suspects died in a gunfight with police.