BATON ROUGE, La. — Baton Rouge Police Chief Carl Dabadie on Tuesday said officers have arrested three people they believe were planning to kill police in the Louisiana city.

The threat emerged after the shooting death of Alton Sterling last week by Baton Rouge police, which has prompted weeklong protests by people concerned about police use of deadly force.

The “credible threat” was why law officers were quick to take aggressive action when they believed protesters were becoming unruly, Debadie and other top law enforcement officers told reporters Tuesday.

“We can’t take anything for granted any more,” said East Baton Rouge Sheriff Sid Gautreaux. “What you saw in the (law enforcement) response is because of the very real and viable threats against law enforcement. Look what happened in Dallas. A very peaceful protest and then some crazy madman.”

Police said they learned of the plot when an officer responded to a burglary at Cash America Pawn early Saturday morning and arrested Antonio Thomas in the store, Debadie said.

Police said Thomas, 17, had one handgun and one airsoft BB gun, and told investigators he and three others stole firearms and were also seeking bullets to shoot police officers, the chief said.

Surveillance video showed the suspects using a ladder to climb to the roof to break into the building, police said.

Thomas was accused of burglary and theft of a firearm and booked into parish prison.

Since Saturday, detectives have arrested two other suspects in the case, including a 13-year-old boy. One suspect remains at large, the chief said.

Malik Bridgewater, 20, was arrested on Sunday at his home and was charged with burglary and theft of a firearm. Detectives recovered three of the stolen handguns with Bridgewater.

The 13-year-old boy was arrested Monday and charged with burglary and firearm theft, police said.

During the investigation, another man, Trashone Coats, 23, was charged with Illegal possession of a stolen firearm after detectives recovered two handguns that he allegedly bought illegally on the street.

Eight handguns were stolen from the pawnshop, six of which have been recovered, Debadie said.

“Our officers have been working around the clock to get these firearms off the streets of Baton Rouge,” he said.