The day after five police officers were fatally shot during a protest in Dallas, 29-year-old Gavin Long took to YouTube to express a controversial view on the incident.
"I'm not gonna harp on that, you know, with a brother killing the police. You get what I'm saying?" Long said, according to a video posted online. "That's, it's justice."
Long - who law enforcement officials said is believed to have fatally shot three officers in Baton Rouge and wounded three others - appears to have been eager for black people to take a strong physical stance against mistreatment by authorities, according to online footage and other materials.
In one video, referring to Native Americans, he said, "When they were extincted by the same people that run this country, my question to you, just something you can think about: At what point should they have stood up?"
In another, he praised the Deacons for Defence - a group of African-Americans who formed an armed self-defence group during the civil rights movement of the 1960s - as men who "when they kids was also getting killed by cops and other white supremacy members, they stood up and stood firm". Long was black.
"It's a time for peace, but it's a time for war, and most of the times when you want peace, you got to go to war," Long said, jazz playing in the background as he spoke. "You see what I'm saying?"
Many details remain unclear about why - and even how - Long killed two Baton Rouge, Louisiana, police officers and one East Baton Rouge sheriff's deputy before law enforcement officers fatally shot him. Police have said only that police were contacted about a man "carrying a weapon, carrying a rifle" and after officers in the area spotted the man, a shootout ensued.
The videos online suggest Long was willing to endorse violent methods to take on those in power. In one clip - purportedly filmed in Dallas after the shooting of police officers there - he said mere demonstrations had "never worked, and it never will" and praised Nat Turner, who led a slave rebellion, and Malcolm X.
"If you all want to keep protesting, do that, but for the serious ones, the real ones, the alpha ones, we know what it's gonna take," Long said. "It's only fighting back or money. That's all they care about. Revenue and blood."
Near Long's home in Kansas City, Missouri, which remained cordoned off with yellow crime scene tape, a woman who identified herself as Long's aunt and gave her first name as Donna acknowledged that Long "killed innocent people" but said he was "a very, very good person, a very very good student."
"We're hurting, too," she said.
A cousin of Long's said that, at least to him, Long had never expressed black nationalist views or even seemed particularly upset about police killings of black men. Tensions have been high since Alton Sterling was shot and killed as two Baton Rouge police officers tried to take him into custody earlier this month. His death, partly captured on video, sparked intense protests in the city and nationwide, and the Justice Department is investigating.
Long's cousin said family members believed that Long had gone to Louisiana to celebrate his birthday and to promote a book he had written recently. He said Long - who had served in the military and attended the University of Alabama at least briefly - was "very smart" and "loved doing stuff for people".
"Right now, I'm at a loss for words," said the cousin, who confirmed that Long was the person speaking in the online videos. "I don't know what was going on with him."
Records released by the military show that Long served five years in the Marine Corps as a data network specialist, from August 2005 to August 2010. He left active duty as a sergeant, according to the records.
The records show that Long deployed once to Iraq from June 2008 to January 2009 and did not experience direct ground combat. He was assigned to units in Miramar, California, and Okinawa, Japan, during his military career. At least one of the officers slain, Matthew Gerald, had military experience, a friend said.
Chris Bryant, a University of Alabama spokesman, said Gavin Eugene Long was a student at the school for one semester in spring 2012, and university police had no interactions with him during this time there. The Anti-Defamation League, which tracks extremists across the country, said it could not immediately find any direct ties connecting Long to any extremist groups.
Long posted a video online that seems to show him distributing his book to people on the street, and his cousin said he believed that is what Long may have been doing in Baton Rouge. The book, The Cosmo Way: A W(H)olistic Guide for the Total Transformation of Melanated People, is styled almost as a self-help guide.
Under the pen name Cosmo Setepenra, Long claimed in the book that he had a "spiritual revelation" while in college and soon sold his cars and gave away his "material possessions," packing just two suitcases for a trip to Africa - his "ancestral homeland". He wrote that he travelled across the continent learning from its "native spiritual practitioners and elder holistic healers" and was concerned in particular that people with darker skin lead healthy, holistic lifestyles.
"Not only have we not been taught how to treat our bodies and spirits in order to live a healthy and holistic lifestyle, we have also lost touch with the ancient teachings of our spiritual elders that would help us to live a healthy holistic life in harmony with nature," he wrote.
Long wrote or posted online frequently under the handle "Cosmo" on an eclectic mix of topics. He described himself online as a "nutritionist, life coach, dietitian, personal trainer, author and spiritual advisor". Records show he was divorced, and his online videos and writings seem to suggest a fascination with black women. His book contains a special thank you to "the all-powerful, most beautiful, one and only Black woman".
Although a review of Long's online postings did not immediately reveal a motive, his Twitter page offered a hint that he may not have feared death.
"Just bc you wake up every morning doesn't mean that you're living," he posted not long before the shootings. "And just bc you shed your physical body doesn't mean that you're dead."