The suspect who shot three police officers dead in Baton Rouge on Sunday was a Marine veteran who served in Iraq, in a chilling parallel with the Dallas cop killings, whose perpetrator served in Afghanistan.
Gavin Eugene Long, a 29-year-old African American widely identified as the shooter by US media, turned his gun on police amid a spate of race-tinged violence involving law enforcement.
Louisiana State Police Superintendent Colonel Mike Edmonson told reporters the gunman was killed, and there are no suspects at large.
Long served in the US Marines for five years starting in August 2005 as a data network specialist, and attained the rank of sergeant, according to his military personnel file. His Iraq tour lasted from June 2008 to January 2009.
Long received several awards, including the Marine Corps Good Conduct Medal, Iraq Campaign Medal, Global War on Terrorism Service Medal, National Defense Service Medal and Navy Unit Commendation Medal.
At a Kansas City, Missouri address where Long was believed to have lived, a man confronted two local journalists by opening the door holding an AK-47 assault rifle, Fox4 reporter Megan Brilley said.
Long studied at The University of Alabama for a single semester in spring 2012 and was a general business major, a spokesman said.
"The UA police had no interactions with him during this time," Chris Bryant told AFP.
Court records showed he married in 2009 and divorced in 2011.
Long, who was based in Kansas City — more than 700 miles north of Baton Rouge — had registered websites where he used the name Cosmo Setepenra.
A Jackson County, Kansas court document showed that Long successfully applied to have his name legally changed to Cosmo Ausar Setepenra.
His application, which cited the United Nations Declaration on the Rights of Indigenous Peoples, was approved in May 2015.
Long said he was a member of the Washitaw Nation, a group of African Americans claiming to be a Native American nation in the United States.
Online profiles of Setepenra, including on professional networking service LinkedIn and in an author biography for a book sold on Amazon, matched Long's military record.
Details of the ownership of various websites linked to Setepenra were shielded.
On one website, he described himself as a "Freedom Strategist, Mental Game Coach, Nutritionist, Author, and Spiritual Advisor."
Setepenra's Twitter feed said he had traveled to Dallas, and he posted videos of himself traveling in the Texas city.
Micah Johnson, the man behind the July 7 shooting in Dallas that killed five police officers, wounded nine and hurt two civilians, was also a black military veteran.
Johnson had served with the US Army Reserve in Afghanistan from November 2013 to July 2014.
Many of the posts on Setepenra's Twitter feed targeted white people.
One of the officers killed by Long — Montrell Jackson — was black. The other two were identified by US media as Matthew Gerald and Brad Garafola.
Long's birthday was on Sunday, July 17, the day he chose to kill the police officers.
In an ominous tweet posted just minutes after midnight on Sunday, he wrote:
On a YouTube page linked to the same online profile, with the handle "I Am Cosmo," he posted videos discussing police brutality. In one said to have been filmed in Dallas, he gave advice on "protesting, oppression and how to deal with bullies."
Some media reports linked Long to anti-government groups such as the New Freedom Group and the Sovereign Citizens.
Baton Rouge itself has been scarred by high racial tensions and numerous protests against police brutality since the death earlier this month of Alton Sterling, a black man shot at point-blank range by police.