A California Highway Patrol officer was killed and two others were wounded in a wild shootout with a suspect on a freeway on Monday, police and reports said.

The suspect who opened fire at the officers also was killed, authorities said.

The officer apparently pulled the suspect over Monday evening on the 215 Freeway in Riverside, the Los Angeles Times reported.

The driver pulled a rifle from inside their car and began firing at the officer, according to the report.

The officer returned fire, and was joined by two other Highway Patrol officers who responded as backup.

Dozens of rounds were fired in the melee, the Los Angeles Times reported.

The Highway Patrol officer and the suspect were rushed to nearby hospitals and declared dead after the shootout, police said.

Two other officers also were injured, but their conditions were not immediately known.