About 40 officers filed out of the Long Beach Courthouse after seeing in person the two gang members suspected of shooting at two of their fellow detectives.
The shooting happened last weekend near MacArthur Park in Long Beach. The two uniformed gang detectives were patrolling in an unmarked police car.
One bullet wounded a 30-year-old detective in the upper torso.
After five days of intense investigation, police announced two arrests.
"They have been identified as Erick Sianez and David Silva, both 19 years, residents of Long Beach and both local documented gang members," said Long Beach Police Chief Jim McDonnell.
Police allege the suspects dumped a handgun after the shooting and abandoned their vehicle a few blocks away. Witness interviews and forensic evidence helped lead police to Silva and Sianez.
Police suspect the teens shot at the detectives because they were fleeing a separate crime scene.
"They were leaving the scene where they had fired a shot in vicinity of some people who were at the street," said McDonnell. "I think anyone who was going to get in their way, they were going to do what they had to do to get away."
Police say the injured detective has been released from the hospital and is expected to make a full recovery.
Police say the investigation is ongoing, and more suspects may be involved.
Silva And Sianez face a number of charges, including attempted murder of the two police officers.
Silva is being held on more than $3 million bail. Sianez's bail is set at more than $2 million.