Mejia is accused of firing at Boyer and Officer Patrick Hazel while the two were responding to a traffic accident in Whittier's Friendly Hills neighborhood Monday morning.
Authorities said Mejia was involved in a car crash near the area of Colima Road and Mar Vista Street. When the two officers approached Mejia and tried to search him for weapons, Mejia opened fire, officials said.
At least one officer returned fire, striking Mejia.
All three were rushed to local hospitals. Boyer, a full-time member of the force since 1990, was pronounced dead.
MORE: Slain Whittier officer identified, honored with procession
Hazel, who served the force for three years, was listed in stable condition in the intensive care unit.
Mejia was also listed in stable condition at the hospital. Sheriff's officials said Mejia was booked and remained hospitalized on Tuesday.
According to investigators, Mejia is a documented street gang member from Los Angeles. He was released from Pelican Bay State Prison on April 19, 2016 and reported to the Probation Department the next day.
Mejia was released on parole under Post Release Community Supervision as required by Assembly Bill 109, a bill signed by Gov. Jerry Brown that moves certain felony offenders from state prisons to county jails.
MORE: Props allowing early release of inmates under fire after Whittier officer killed
Authorities said he was released approximately 10 days ago, and a parole check was recently conducted at his home.
In addition to the Whittier shooting, Mejia was believed to be involved in a murder in City Terrace earlier the same day.
Authorities stated the shooting death happened in the 1400 block of Voleny Drive at about 5:30 a.m.
The victim was Roy Torres, Mejia's cousin, officials confirmed.
The car Mejia was driving at the time of the Whittier traffic accident was stolen from the murder scene, according to authorities.
If you have any information about either incident, you're urged to contact the Los Angeles County Sheriff's Homicide Bureau at (323) 890-5500. You can also provide anonymous tips by calling Crime Stoppers at (800) 222-TIPS. null