A California Highway Patrol (CHP) officer was killed along with the suspected gunman during a shootout in southern California on Monday, police said.
Two other CHP officers then arrived at the scene and also began firing at the suspect who was shot during the shootout and was later pronounced dead, authorities said.
Two other officers were also injured, but their conditions were not immediately known.
The shootout occurred around 5:30 p.m. (0030 GMT) in Riverside, California, about 55 miles (86 km) east of Los Angeles just off U.S. Interstate 215, CHP Assistant Chief Scott Parker said at a press conference.
The officer put out a call for help which brought officers from CHP, Riverside Police and the Riverside County Sheriff's Department to the scene, Railsback said.
It was not clear if the officer making the stop was the officer killed.
In a message posted on Twitter late Monday evening, CHP Commissioner Warren Stanley said: "I am devastated by the tragedy that unfolded earlier in Riverside".
Dozens of rounds were fired, according to local media, and motorists stopped in traffic fled their vehicles and ran for cover from the gun battle.
Video after the shooting showed bullet holes in the front windows of two patrol cars and large holes blown in their back windows.
The suspect was struck at the scene and officials later said he had died.
Moye is survived by his wife, parents, and siblings, the release said.
Flags at the capitol will be flown at half-staff in his honor, the governor's office said.
Moye served as a CHP officer for almost three years and was assigned to Riverside after graduating from the CHP Academy in 2017, a release from Newsom's office said.
While authorities did not immediately release the names of the slain CHP officer or the man with the rifle, family members identified the deceased officer as 33-year-old Andre Moye Jr., who was married and had been with the CHP for about four years, KABC-TV reported.
"That is all going to be part of this lengthy investigation", he said.