Authorities sought to learn more on Monday about a decorated ex-US Marine sergeant who killed three police officers in Baton Rouge, Louisiana, some two weeks after police there shot dead a black man, sparking nationwide protests including one shattered by the massacre of five Dallas policemen.
The suspect in the latest case, dressed in black and armed with a rifle, was shot dead on Sunday morning in a gunfight with police who converged on the scene of a confrontation that Mayor Kip Holden said began as an ambush.
Two Baton Rouge Police Department officers and one sheriff's deputy were killed and one sheriff's deputy was critically wounded. Another officer and one other deputy suffered less severe wounds.
Police did not identify the suspect but a US government official told Reuters he was Gavin Long, of Kansas City, Missouri. Long, who was black, was reported to have attacked police on his 29th birthday.
"It's hard to know what his motivations were," Louisiana Governor John Bel Edwards told MSNBC reporters on Monday. A news conference was scheduled to discuss the shooter, Edwards said.

Louisiana State Police officers leave the scene of the crime where three police officers were killed on Sunday in Baton Rouge, Louisiana.

US Attorney General Loretta Lynch, in remarks prepared for a conference of black law enforcement officers, condemned the Baton Rouge attack "in the strongest terms possible" and said agents from the Federal Bureau of Investigation and other federal agencies were in the city to help local authorities.
Colonel Mike Edmonson, superintendent of the Louisiana State Police, told a news conference the gunman was believed to have acted alone.
It was not immediately clear whether there was a link between the bloodshed and unrest over the police killings of two black men in questionable circumstances this month - Alton Sterling, 37, in Baton Rouge on July 5, and Philando Castile, 32, near St. Paul, Minnesota, on July 6.
According to the Pentagon, Long served in the Marines from 2005 until 2010, achieving the rank of sergeant. A data network specialist, he was deployed to Iraq from June 2008 until January 2009, earning several medals and commendations.
Authorities declined to offer a possible motive for the attack in Louisiana's capital, a city with a long history of distrust between African-Americans and law enforcement that has been inflamed by Sterling's death.
Social media postings linked to an individual named Gavin Long and a Kansas City address cordoned off by police included a July 10 YouTube video saying he was fed up with mistreatment of blacks and suggesting only violence and financial pressure would bring change.
He also said he was speaking from Dallas after going there to protest.
"It's only fighting back or money. That's all they care about," he said to the camera. "Revenue and blood, revenue and blood, revenue and blood."
In a separate video, he hinted that should anything happen to him, he wanted viewers to know he was not affiliated with any particular movement or group.
Pandemonium caught on radio
A second government source, speaking on condition of anonymity, said an emergency 911 call may have been used to lure Baton Rouge police.
Edmonson said several officers came under fire as police responded to a report of a man dressed in black standing behind a store holding a rifle.
In the ensuing pandemonium caught on a recording of emergency radio traffic, police repeatedly report "officer down" and "deputy down" as officers swarmed the area, ultimately confronting the gunman. The episode was over in about eight minutes.
Killed were Montrell Jackson, 32, a new father who had served for 10 years with the Baton Rouge police; Matthew Gerald, 41, a newly minted officer with a military background; and Sheriff's Deputy Brad Garafola, 45, a father of four.
President Barack Obama condemned the attack, vowing justice would be done and calling on Americans to focus on unity.
"We as a nation have to be loud and clear that nothing justifies violence on law enforcement," Obama said in televised remarks.
The violence also has heightened security concerns, notably in Cleveland, where Donald Trump is expected to get the presidential nomination at the Republican National Convention, and Philadelphia, where Democrats are to nominate Hillary Clinton for the November 8 election.