Four violent gang members have been convicted for their involvement in a wild chase that ended with a California Highway Patrol officer's cruiser being rammed and peppered with gunfire, and all but one face significant prison terms, authorities said Thursday.

The three men and a 17-year-old boy entered guilty pleas Friday at the Hayward Hall of Justice for their roles in their attack on CHP Officer Sean Deise.

The chase began on July 21 when Deise tried to stop a van occupied by David Gonzalez, 23, and Samiuela Sina, 18, on 50th Avenue in East Oakland, authorities said. The two refused to stop, and Deise took up pursuit.

Several bullets shattered the rear windshield, police said. Deise was not hurt and has since returned to duty.

"It's a danger that we all face every day brought a little bit closer to home for him," said CHP Assistant Chief Paul Fontana. "But he's out there, he is a hardworking officer, committed to public safety, and it's not deterred him from doing his job."

David Gonzalez and Sina were arrested shortly after the incident. Joseph Gonzalez surrendered after a standoff in Oakland two days later.

"These arrests are of significant, violent criminals that want to do harm to the very people that protect and serve our communities," said interim Oakland Police Chief Sean Whent.

Joseph Gonzalez was convicted of assault with a firearm on an officer and weapons enhancements and is expected to be sentenced June 28 to 27 years in prison, said Elgin Lowe, a deputy district attorney.

Sina was convicted of carjacking and will get eight years.

David Gonzalez also was convicted of carjacking and will get three years behind bars, and Thomas, who was charged as an adult, pleaded guilty to robbery and is to be placed on five years' probation.