COMPTON, Calif. -- Investigators have arrested and charged a man in connection with the ambush shooting of two Los Angeles County sheriff's deputies earlier this month, with authorities revealing Wednesday the suspect is connected to a separate crime.
The suspect, identified as 36-year-old Deonte Lee Murray, was arrested two weeks ago after an armed carjacking that prompted a massive search. At the time, authorities said the carjacking -- in which a 51-year-old man was shot in the leg with a high-powered rifle -- was not connected to the shooting that left both deputies critically wounded.
However, sheriff's homicide Capt. Kent Wegener said a pistol that Murray discarded while being pursued by sheriff's investigators prior to a standoff was the one used to shoot the deputies. Wegener said a thorough investigation was needed to link Murray to the shooting, and the ballistics report was not concluded until several days after the carjacking.
When asked about a motive Wegener said the suspect "hates" law enforcement.
Murray, who authorities say is associated with multiple gangs, has been charged with attempted murder in connection with the shooting. He is expected to be arraigned on the charges sometime Wednesday at the Compton courthouse, District Attorney Jackie Lacey says.
The deputies were shot while sitting in a marked patrol car at a train station in Compton on Sept. 12.
Surveillance video shows the gunman approaching the window on the passenger's side and firing several times at close range. The man then ran off on foot. One deputy was seen emerging from the passenger side and stumbling around on foot for several seconds before the video ends.
RELATED: Video shows wounded deputy struggle to aid partner after Compton shooting
"Despite being critically injured, the deputies valiantly cared for each other's wounds and safety, communicated their location and plight to others, and tactically prepared for another attack,'' according to a statement from the department. "The suspect fled the scene, and a monetary reward was offered for information leading to their arrest and conviction.''
The deputies, a 31-year-old woman and 24-year-old man who have not been identified publicly, graduated together from the sheriff's academy 14 months ago.
Both deputies were released from the hospital earlier this month.
In recent weeks, demonstrators have marched to protest fatal shootings in the South L.A. area, where deputies killed a Black man on Aug. 31 and a Black teenager in 2018.
After the ambush, a handful of protesters gathered outside the hospital where the deputies were treated and tried to block the emergency room entrance. Videos from the scene recorded protesters shouting expletives at police and at least one yelling "I hope they ... die."
Sheriff Alex Villanueva said those who allegedly cheered at the scene after the deputies were shot and those who wished death on the deputies showed the "worst of humanity."
Wednesday's announcement follows a separate, seemingly unprovoked assault on another law enforcement officer in the Los Angeles area.
An L.A. police officer was attacked Saturday night inside a train station in San Pedro. The assailant was recorded on surveillance video as he knocked the officer to the ground inside the station, pistol-whipped him with his own gun and pointed it at his chest. The officer is recovering from his injuries.
The Associated Press and City News Service contributed to this report.