LOS ANGELES — Two men opened fire on a police car patrolling a tough part of Los Angeles, but the two officers inside were not injured and one was able to shoot back, authorities said Monday. One of the suspects was later arrested and the other is on the loose.

The shooting occurred amid heightened tensions over attacks on police elsewhere in the country after grand juries declined to indict white officers in the killings of unarmed black men.

Police have not yet determined a motive for the Sunday night shooting in South Los Angeles – an area plagued by gang violence – but said there were no indications it was linked to other attacks on police in the country.

“It was a complete unprovoked attack,” LAPD Deputy Chief Bob Green said initially. “They were just driving on the street, and somebody struck out and tried to kill two policemen.”

However, Green later said police were looking into whether the officers might have driven into an ongoing dispute and were inadvertently fired at.

“Last night the initial assessment, based on the reaction of officers and the adrenaline factor, was they were getting ambushed, but, you know, things change and it takes a lot to investigate this,” Green said.

One man was arrested shortly after the attack. An hours-long search followed for the other man, but he remained at large. Police were looking for video evidence and conducting interviews to determine details such as why and how the shooting occurred.

The names of the suspect and targeted officers were not released.

The two officers were responding to an unrelated radio call and driving slowly in a neighborhood when they saw two men on a sidewalk and the flash of a rifle being fired, police said.

The officers stopped the car, and one got out and returned fire as the men fled. Police found one suspect, uninjured, a short time later along with a rifle and another weapon.

Police searched the neighborhood throughout the night for the other suspect, warning nearby residents to stay in. Police stopped the search after the suspect was not found.

Tyler Izen, president of the Los Angeles Police Protective League, said the “blatant violence” was an outrage.

“Anyone who is willing to murder a law enforcement officer threatens the fundamental fabric of our society, and that should terrify the community,” Izen said in a statement. “Murdering police officers is not a form of protest, it is an affront to all citizens and to public safety.”

The shooting came as protesters across the country have rallied for weeks against police killings of unarmed black men in Missouri and New York.

The killing of two New York City officers in their patrol car has authorities on edge across the country.