Authorities in Baton Rouge, Louisiana say the ambush-styled shooting in their town that left three police officers dead is no longer an active shooter scenario, and that they are confident the shooter who killed the officers was the same as the suspect killed by other officers at the scene.
The gunman died in a shootout with police a short time after he opened fire on the first group of officers, Colonel Mike Edmonson, superintendent of the Louisiana State Police, said in a press conference.
"We do believe based on the information that we have... that the person that shot and killed our officers, that he is the person that was shot and killed at the scene," Edmonson said.
A gunman killed three police officers and wounded three others in Louisiana's capital on Sunday, just days after the police shooting of a black man there sparked nationwide protests, one of which led to the massacre of five Dallas policemen.
Officers in Baton Rouge were responding to a call of a man carrying a gun when shots were fired at around 9 am local time (1400 GMT). Two Baton Rouge police officers and one sheriff's deputy were killed.
"A call came into central dispatch of the Baton Rouge police department saying that there was a guy carrying a weapon, carrying a rifle, walking in that particular area… Baton Rouge PD officers at a convenience store observed the individual. He was wearing all black standing behind a beauty supply store holding a rifle," Edmonson said.
The suspect, identified by a US official as Gavin Long of Kansas City, Missouri, was believed to have acted alone. Investigators suspect a 911 emergency call may have been used to lure police to the scene, the official said on condition of anonymity.
It was not immediately clear whether there was a link between the shootings and the recent unrest over the police killings of black men in Baton Rouge and Minnesota.
Authorities did not give any information about the gunman's possible motive.
President Barack Obama condemned the attack, vowed that justice would be done and called on Americans to focus on rhetoric and actions that united the country rather than divided it.
Obama has sought to balance concerns about police abuses, largely against African-Americans, while paying tribute to fallen officers. He attended a memorial service last week for the five Dallas police officers killed by a black ex-US soldier at the end of a protest against the fatal police shootings of Alton Sterling in Baton Rouge and Philando Castile in Minnesota.
The Black Lives Matter civil rights movement has called for police to end racial profiling, bringing the issue to national attention ahead of the November 8 US presidential election. Republicans have pushed back, calling for support of the police.
It is a time of especially heightened security across the country, notably in Cleveland and Philadelphia, hosts to this week's Republican National Convention and next week's Democratic National Convention, respectively, which are expected to formally nominate Donald Trump and Hillary Clinton for the election.