This frame grab made from a video posted on YouTube on July 10, 2016, shows Gavin Eugene Long speaking as his online persona Cosmo Setepenra. (Gavin Long/AP)

In his final months, Gavin Eugene Long traveled the country as a modern-day salesman, hawking his books, videos and podcasts as a way to tap into his newfound “spiritual revelation.” Herbal supplements, purified water and a vow of celibacy were all part of the holistic pitch refined by the former Marine.

And along with his new purpose, there came a new name: Cosmo Ausar Setepenra.

The Baton Rouge shooter, who killed three law enforcement officers here on Sunday morning until he was felled by a police sniper, was known online to hundreds of followers as a young entrepreneur trying to build a social movement through his brand: “Convos with Cosmo.”

But a review of his social media history, along with interviews with those who came into contact with him, reveal that he seemed to live a lonely existence with little, if any, meaningful interactions.

The 29-year-old claimed ownership among a variety groups with widespread beliefs — from the “Washitaw Nation,” a controversial black American sovereign citizen movement, to Internet conspiracy forums, to “alpha male” types that advocate for dominance in relationships with women. Most recently, he criticized NBA star Steph Curry for “not keeping his woman in check at all times.” He also frequently wrote about race and inequality, his “Afrikan” roots and what he called “the white supremacy myth.”

In this Sunday, July 17, 2016, security video frame grab made available by the Louisiana State Police shows Gavin Eugene Long dressed in black and carrying a gun in Baton Rouge, La. Authorities said Long ambushed law enforcement officers fatally shooting multiple officers and injuring several others before he was killed. (Louisiana State Police via AP) (AP/AP)

He joined and interacted with at least two online groups whose members express anger and paranoia about the government and police surveilling and conducting experiments on them.

On Monday, it was still unclear how, and why, Long made his way in a Chevy Malibu rental car from Missouri to Louisiana prior to Sunday’s mass shooting. Officials said they were still exploring his possible connections to the area. After the shooting, a Washitaw Nation membership card was recovered from Long’s body, according to law enforcement sources.

“It’s very possible he was a seeker . . . someone who goes from cause to cause and looks at a number of causes, trying to find something,” said Mark Pitcavage, a senior research fellow at the Anti-Defamation League’s Center on Extremism who has studied the Washitaw Nation for nearly 20 years.

The indigenous group — an offshoot of the sovereign citizen movement — claims its members descended from ancient “Mound Builders” in the northeastern part of Louisiana, close to Monroe. Members of the Washitaw Nation have long been criticized for alleged scams and anti-government beliefs. Across the country, fraudulent schemes from fake IDs and license plates to landlord disputes with squatters have been linked to those who claim to be affiliated with the group.

Pitcavage said the group’s Louisiana base fizzled after its founder, Empress Verdiacee Tiari Washitaw-Turner Goston El-Bey, moved to California and later died. But he said the Washitaw Nation “brand” lived on across the country, in smaller groups that claim affiliation with the larger movement.

“Sovereign citizens rationalize the ability to disobey virtually any law, order, pact, you name it,” Pitcavage said. “It is one of the extremist movements in the United States that targets police. It believes that law enforcement has no jurisdiction over it whatsoever.”

Reporters who visited Long’s last known address in Kansas City said they were met with hostility. A Kansas City reporter who knocked on the door said he was greeted by a man who answered his questions by brandishing a long gun.

In Missouri, court records show Long had a difficult childhood. His parents, Herschel Long and Corine Long, married in 1985. Gavin was born less than two years later and was their only child. The couple finalized their divorce in 1998 — when Long was about 11— the judge noted that Gavin’s father “has done very little to foster and maintain an affectionate relationship between himself and the child.”

His father failed to appear for visits. He didn’t buy birthday or Christmas gifts for him. On one visit, he picked up his son only to deposit him in day care at a casino.

“The father’s conduct toward the child has been unkind and inexcusable. . . . Gavin very much misses his father,” wrote the judge, who granted sole custody to his mother.

The family appeared to struggle financially. Court records from the time of his parent’s divorce record show a repossessed car and very little balance in his parents’ bank account. And neither parent could afford health insurance for Gavin.

According to the divorce documents, his father didn’t graduate from high school and worked as a itinerant repairman on air-conditioning units, furnaces and refrigerators, including for one barbecue restaurant chain in Kansas City.

In his own writings, Long discusses little about his youth except for a physical transformation that occurred at age 16, when he said he lost 80 pounds in six months by adhering to a regimen of strict diet and fitness. Long served from 2005 to 2010 in the Marines. In Vol. 2 of his book, “The Cosmo Way” he boasted about earning the rank of E-5, a sergeant, as “one of the Corps’ most physical fit Marines.”

Long earned an associate’s degree from Central Texas College. He attended the University of Alabama for one semester in 2012 and later attended Clark Atlanta University from 2012 to 2013. It was there, he wrote, that he experienced a “spiritual revelation” that spurred him to abandon his personal possessions and travel to Africa for two years.

In 2015, Long filed legal papers in Missouri to change his name to Cosmo Ausar Setepenra. In those documents, he claims he was born within the “United Washitaw de Dugdahmoundyah Mu’ur Nation,” an indigenous group.

In Baton Rouge, a man closely tied to the original Washitaw group near Monroe stated that the Missouri documents were fraudulent.

“He was deceived,” said R.A. Umaralli Shabazz Bey, a 53-year-old beekeeper who used to work as a judge within the Washitaw territory. “You either have it by birthright or you don’t. You can’t buy membership into this. That’s a scam.”

Shabazz Bey, who strongly disputed the suggestion that the Washitaw Nation has anti-government or anti-cop beliefs, noted that the name “Cosmo” is a popular one among members of Moorish groups. He said the name alludes to a concept of a “universal person” on Earth.

In February, Long was making his rounds across the country to promote his book, “The Cosmo Way.”

“Afrikan is your blood, DNA and roots. Be proud of it.” he wrote in the last chapter. “. . . I love you, our Creator loves you, and remember — you were born to win but trained to lose. It’s time to get back in the game, to win.”

In his book, Long claimed to be a distributor of “Kangen Water Systems,” a Japanese-made ionization machine that purports to improve hydration and reportedly costs more than $1,000. He touted its water as being “5x more absorbent than tap water,” with 8.5 times more antioxidants than green tea.

Long listed his business partner as “Umar Bey” and included his e-mail address in the book. Bey, reached by phone in Georgia on Monday, said he only communicated with Long, whom he knew as “Cosmo,” twice.

“He said he had done a lot of research before deciding to invest in this equipment,” said Bey, 46. “He said he learned about water in Japan and in Africa.”

Bey said he sold the product to Long sometime last year. He said he was unaware that Long endorsed the machine in his book, or that he claimed to be a distributor of the water machine.

Jenny Reese, 34, met Long briefly when he stopped by a Reiki center in Virginia Beach. Reese worked there as a Reiki Master, practicing hands-on healing techniques.

“I was working at the front desk, and we chatted for about 15 minutes,” she said. “He was just telling me that he was into energy healing.”

Reese said that Long gave her a copy of his book and then left.

She later interacted with Long on his Twitter account, “Convos with Cosmo.” On Monday morning, a Washington Post reporter told her that Cosmo was the Baton Rouge shooter.

“Oh wow,” she said. “I’m very surprised because he seemed to be such a positive person. He was trying to get out there and meet people.”

She said she couldn’t say if his views on healing were considered to be extreme or particularly odd within the alternative therapy community.

She said she only flipped through the book but never got the chance to read it.

Ashley Cusik in Baton Rouge and Julie Tate, Adam Goldman, Matt Zapotosky, Kevin Sullivan and Mark Berman in Washington contributed to this report.