A man who led Santa Rosa police on a chase through downtown before crashing his vehicle into a police car pleaded no contest Thursday to charges stemming from the incident, Sonoma County District Attorney Jill Ravitch said in a statement.

Under the terms of the plea deal, Jose Rafael Castillo, 20, of Santa Rosa will serve 6 years in prison for felony assault with a deadly weapon on a peace officer. Castillo also admitted to a 2010 felony assault with a deadly weapon on his probation officer, according to a statement released by the District Attorney's Office.

Santa Rosa Police Officer Brett Siwy tried to stop Castillo for a suspected vehicle code violation Nov. 17, but Castillo, who had an active arrest warrant at the time, fled. He led them on an eight-minute chase. At the end of the pursuit, Castillo stopped his car, pointed it at Siwy's patrol vehicle and rammed his vehicle into Siwy's car, the statement said.

Castillo's sentencing hearing is scheduled for April 11.