A Long Beach police officer and a 31-year-old man were shot Sunday night in an exchange of gunfire involving several police officers at an apartment complex.

A woman called at 9:06 p.m. reporting that a man had fired shots in the 3000 block of East Artesia Boulevard, according to a statement provided by the Long Beach Police Department.

After an officer arrived on scene, a woman who was "screaming for help hysterically while pulling on the patrol car door handle" said the gunman was in a nearby apartment complex, police said.

After more officers arrived, they entered the apartment complex courtyard and were shot at by the gunman. Officers fired several shots at the man, police said.

The gunman dropped his handgun and fled, but police later detained him using a Taser, police said. The suspected gunman was identified as Eric Arroyo, and he was arrested on suspicion of attempting to kill a police officer, officials said.