A former US Marine sergeant who served in Iraq identified as the Baton Rouge gunman is believed to be behind a number of online videos that reveal much about his beliefs.
Three police officers were killed and three others wounded in what's been described as an ambush-style attack in Baton Rouge, Louisiana, early on Sunday morning (local time).
The suspect, Gavin Eugene Long, 29, was from Kansas City, Missouri, a source familiar with the investigation told Reuters.
A website, social media accounts and YouTube videos from Long include complaints about police abuse of African-Americans and indicate he recently joined demonstrations in Dallas, where a black former member of the US Army Reserve killed five officers two days after Sterling's death.
"Violence is not THE answer (its a answer), but at what point do you stand up so that your people dont become the Native Americans...EXTINCT?" he tweeted on Wednesday.
A website named "convoswithcosmo" that features self-help, health and relationship advice was owned by a Gavin Long at a Kansas City address, according to online records.
In a YouTube video posted on July 10, the host of "Convos with Cosmos" says he is in Dallas and had gone to the city to join protests there. The man says that African-Americans are oppressed and questions why white American revolutionaries are praised for fighting their oppressors but African ones are not.
Later in the video, he suggests that only violence and financial pressure will cause change.
"We know what it's going to take. It's only fighting back or money. That's all they care about," he says to the camera.
"Revenue and blood, revenue and blood, revenue and blood. Nothing else."
A government source said federal officials were reviewing the web postings but could not definitively link them to Long.
Divorced and living in a working-class neighbourhood, Missouri records show Long had no criminal history.
It's not immediately clear how he ended up in Baton Rouge, where police killed him in a shootout on his 29th birthday, according to media reports.
The city has become a flashpoint for protests after police shot and killed Alton Sterling, a black man, outside a convenience store there on July 5.
Long attended the University of Alabama for one semester in spring 2012 and made the dean's list for academic achievement, said university spokeswoman Monica Watts.