A man has been charged with attempted murder after he fired multiple shots into a Los Angeles County sheriff's patrol vehicle earlier this month.

Deonte Lee Murray, 36, allegedly fired a handgun into the squad car as it was parked near a train station in Compton on Sept. 12. The two deputies inside were critically wounded, but were able to radio for help.

The deputies, a 31-year-old woman and 24-year-old man whose identities have not been made public, suffered head wounds and were rushed to the hospital in critical condition.

"They became victims of a violent crime for one reason," District Attorney Jackie Lacy said at a press conference Wednesday. "They were doing their job and they were wearing a badge."

They've since been released from the hospital, but Sheriff Alex Villanueva says they'll need additional surgeries.

Police couldn't offer a more specific motive for the attack on the deputies, "other than the fact that he obviously hates policemen and he wants them dead," Sheriff's Homicide Bureau Capt. Kent Wegener said.

Murray has been in custody for weeks, but it took several days for police to connect him to the deputies' shooting through forensic evidence.

As detectives reviewed surveillance footage from the shooting, they saw that the lone gunman had escaped in a black Mercedes Benz sedan. It turns out sheriff's deputies had already arrested Murray earlier in September for stealing a Mercedes Benz sedan in Compton.

During the car-chase that led to that arrest, Murray had thrown a pistol out the window. Deputies later recovered it, and using ballistic comparison, determined it was the same gun used to shoot the sheriff's deputies.

"That pistol was conclusively linked, through forensic testing, to suspect Deonte Murray," Wegener said.

Murray faces a maximum sentence of life in prison.

Copyright 2020 NPR. To see more, visit https://www.npr.org.