The man identified as the killer of three United States police officers in Baton Rouge had posted videos complaining at police treatment of African Americans and urging them to “fight back”.
One of Gavin Long’s videos stresses he is not linked to any group but is “affiliated with justice”.
The ex-Marine, 29, was killed by police during the attack on Sunday morning.
Tension has been high since police shot dead a black man in Baton Rouge two weeks ago.
That death – and a second police shooting in Minnesota – sparked protests across the US and triggered a revenge attack by a black army veteran who shot dead five officers in the city of Dallas.
Responding to the latest killings, President Barack Obama called upon all Americans to unite and refrain from divisive language.
Louisiana State Police said on Monday that they had now positively identified Long as the gunman via fingerprints and said he had been “certainly seeking out police”.
Col Mike Edmonson said: “His movements, his direction, his attention was on police officers.”
More details have emerged about Long, who was from Kansas City, Missouri, including his service history.
A Marine from August 2005 until August 2010, he rose to the rank of sergeant and served in Iraq from June 2008 until January 2009, earning a number of medals and commendations. He received an honourable discharge.
His video and online postings used the pseudonym Cosmo Setepenra. He railed against what he saw as injustices against black people, at one point saying “you gotta fight back”.
Baton Rouge shootings: Gunman’s videos show anger at police
