The killer of three Baton Rouge police officers has been identified as an ex-Marine from Kansas City, Missouri.
WAFB television, citing police officials, says Gavin Eugene Long was a former Marine, who turned 29 on Sunday, and was killed in a shootout with police after killing three other officers.
Three more police officers were wounded in the shootout, with one of them in a critical condition in a local hospital.
CBS reports that Long is African-American although that has not been confirmed by the authorities.
Police also arrested two other people thought to be linked to the attack, although they say they believe Long was the only person to take an active part in exchanging gunfire with police.
The shootout erupted after a 911 call about reporting a suspicious man with an assault rifle walking down Airline Highway, which runs in front of the Baton Rouge police headquarters.
Police said the man was dressed in black, wearing a bullet-proof vest with his face covered, and he opened fire on officers in an apparent ambush when they arrived on the scene in response to the 911 call, WBRZ television reported.
Authorities have not speculated on the motives for the attack, which comes more than a week after an African-American sniper killed five white police officers in Dallas, an attack coming in apparent response to the killing of two black men by white police officers in incidents in Baton Rouge and in Minnesota.
After Long was killed, a robot was used at the scene to make sure there were no explosives, Baton Rouge Police spokesman L'Jean Mckneely said.
Police earlier told reporters that authorities are seeking more than one suspect and said the public should be on the lookout for people dressed in black and carrying long guns.
US President Barack Obama has been briefed on the shootings and will be updated throughout the day, the White House said.
Mr 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 at the end of a protest against fatal police shootings of two black men - one in Baton Rouge and another 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.
"We demand law and order," Mr Trump said in a Facebook posting Sunday afternoon (local time).
Trump seized on the shooting deaths of the officers in Baton Rouge to bolster his case that he is the better candidate in the presidential election to restore law and order than his rival.
"We grieve for the officers killed in Baton Rouge today. How many law enforcement and people have to die because of a lack of leadership in our country? We demand law and order."
Clinton had no immediate comment on the latest violence.
There were no plans to delay Monday's start of the four-day Cleveland convention, where thousands of Republican delegates are gathering amid a threat of protests both for and against Trump, 70.
Sunday's shootings occurred around 9am local time about a mile from the Baton Rouge Police Department headquarters, where dozens of people were arrested earlier this month while protesting the death of Alton Sterling.
The 37-year-old African-American father-of-five was shot and killed at close quarters by law enforcement officers on July 5.
A witness to Sunday's shootings, Brady Vancel, told a CBS television affiliate he had seen a gunman, a second man in a red shirt lying in a parking lot and another gunman running away "as shots were being fired back and forth from several guns."
He said the police arrived shortly after the gunfire began.
"Multiple officers from both agencies sustained injuries and were transported to local hospitals," a police official said in an email.
One officer was listed in critical condition at Our Lady of the Lake Regional Medical Center, while another was in fair condition, hospital spokeswoman Kelly Zimmerman said.
The third injured officer was taken to another hospital and his condition was unknown.
AAP / Reuters