A man who allegedly shot at several police officers who were investigating a separate shooting in North Long Beach last month has been arrested, authorities said.

Long Beach resident Jason Santiago Gonzalez, 24, was taken into custody Friday in the city of Gardena on suspicion of attempting to murder five police officers during the early hours of April 16, according to the Long Beach Police Department.

“This unacceptable act of violence committed against our police officers serves as a stark reminder of the inherent danger in the law enforcement profession,” Chief Wally Hebeish said in a statement. “I commend the brave officers who risk their lives every day to keep our community safe.”

Police say that on the day of the shooting, officers responded around 12:41 a.m. to the area of Market Street and Cedar Avenue following a report of a person with a gun.

There, officers determined a group of people had been involved in an argument when a man, later identified as David Gonzalez—the suspect’s older brother—pulled out a gun and fired multiple shots before fleeing into a nearby apartment, the LBPD said, adding that nobody was injured in the shooting.

While establishing a perimeter around the apartment David Gonzalez was in, officers heard shots fired several blocks to their west, according to police. About 30 minutes later, the officers heard more shots being fired several blocks to their east, police said.

Investigators located casings near Market Street and Locust Avenue and Market Street and Pacific Avenue and determined the officers had been shot at. No officers or department vehicles were struck by the gunfire, police said.

David Gonzalez was eventually taken into custody on suspicion of possessing ammunition that is prohibited after the LBPD activated its SWAT team and served a search warrant at the apartments, police said.

At the time, police didn’t know whether the shootings were connected, and said that David Gonzalez had not yet been determined to be a suspect in any of the shootings.

Through their investigation, police came to the conclusion that Jason Gonzalez had fired at officers from a nearby location while they were attempting to get his brother to surrender, authorities said.

Following his arrest, Jason Gonzalez was booked on five counts of attempted murder and one count each of negligent discharge of a firearm, possession of a loaded firearm, and possession of methamphetamine for sale, police said. His bail was set at $5 million.

Detectives will continue to evaluate all evidence and investigative leads, according to police, who said the case will be presented to the Los Angeles County District Attorney’s Office for filing consideration early next week.

Man arrested after stealing ambulance from scene of fatal fire, authorities say