(BATON ROUGE, La.) -- The lone gunman in a shooting rampage that killed three Baton Rouge, Louisiana police officers and injured three more referenced the police shooting of Alton Sterling and talked about using violence to "fight back," in videos posted online.
Investigators are scouring the online trail of videos and social media posts left behind by 29-year-old Gavin Long in an effort to find a motive that led to the deadly attack, law enforcement sources tell ABC News.
Social Media Clues?
Long was a prolific user of social media, posting dozens of videos and podcasts on his webpage, "Convos With Cosmo," in addition to regularly tweeting and posting on Twitter and Instagram under the pseudonym "Cosmo Setepenra."
According to his website, Long referred to himself as a "Freedom Strategist, Mental Game Coach, Nutritionist, Author and Spiritual Adviser."
In a video titled "Convos With Cosmo on Protesting, Oppression, and how to deal with Bullies" that was posted a week before Sunday's shooting, he rants about "fighting back" against "bullies" and discussed the killings of black men at the hands of the police -- referencing the death of Alton Sterling, who was shot and killed by police in Baton Rouge earlier this month.
"One hundred percent of revolutions, of victims fighting their oppressors have been successful through fighting back, through bloodshed," Long said in the nearly nine-minute-long video. "Zero have been successful just over simply protesting. It doesn't -- it has never worked and it never will. You got to fight back. That's the only way that a bully knows to quit."
Long also posted about Micah Johnson, the man who killed five Dallas officers less than two weeks ago, saying he was "one of us" on Twitter.
And just hours before Sunday's deadly shooting, Long posted his last tweet saying, "Just [because] you wake up every morning doesn't mean that you're living. And just [because] you shed your physical body doesn't mean that you're dead."
The shooter, identified as 29-year-old Gavin Eugene Long of Kansas City, Missouri, is listed on the Servicemembers Civil Relief Act (SCRA) website as having joined the Marines in August 2005 and ended active duty in August 2010.
Military records released Sunday night show Long made the rank of sergeant and was a Data Network Specialist. He deployed to Iraq once, from June 2008 to January 2009, and also served at a Marine Corps base in Okinawa, Japan, the records say.
Federal authorities are also currently looking at ties Long may have had to an anti-government group that he apparently showed support for online, according to a source familiar with the probe.
Police said they recovered Long's cellphone during the altercation with law enforcement. The source said Long appeared to have rented a car in his hometown of Kansas City and drove more than 700 miles to Baton Rouge.
Investigators initially suspected the involvement of multiple shooters, but later determined that Long appeared to have been a lone gunman.
East Baton Rough Sheriff Sid Gautreaux said the shooter was "definitely targeting police officers." But it remains unclear whether Long called police before the shooting took place in order to lure officers to the scene.
Authorities also confirmed Monday morning that they positively ID'd Long as the shooter using his fingerprints.
Incident Caught on Camera
The first reported cellphone video, which was recording via Facebook Live, captured the chaotic scene between police and the gunman.
Charmaine Adams, along with her attorney, told ABC News she shot the video from her car while at the gas station. Adams said that Long and at least one officer were shooting at each other at the scene.
"He ended up going around to the back of the car and the officer literally on our driver side of the car, shooting over us," Adams said in an exclusive interview with ABC News' Good Morning America.
"I was actually kind of waiting for a bullet to hit me. It was that close," she added.
Authorities in Baton Rouge released the names of the officers killed, as well as some of those who were injured.
Brad Garafola, 45, a 24-year veteran of the department, Montrell Jackson, 32, and Matthew Gerald, 41, were killed during Sunday's attack, according to the East Baton Rouge Sheriff's office.
Jackson had served in the department "for a decade," the office said, while Gerald had been working there for less than a year. Both were members of the Uniform Patrol Bureau, the department said in a post on Facebook, and "were great examples of what it means to protect and serve."
The sheriff's office also identified two injured officers. Nicholas Tullier, 41, was in critical condition, while Bruce Simmons, 51, is recovering from non-life threatening injuries, according to the sheriff.
Tullier, who had served for 18 years, and Simmons, a 23-year veteran, were both members of the Uniform Patrol Traffic division.
"These men are husbands, fathers, sons and brothers," Sheriff Sid Gautreaux said of the officers from his office. "We are devastated to lose one of our own, and another is now in a fight for his life."
"We are asking for your prayers at this time," the sheriff said. "We will get through this together as a family and as a community."
White House Responds
President Obama said "nothing justifies violence against law enforcement," during a Sunday afternoon press conference at the White House.
The president said these type of attacks on public servants and police "have to stop."
"We as a nation have to be loud and clear that nothing justifies violence against law enforcement," he said. "Attacks on police are an attack against all of us ... the rule of law that makes society possible."
Speaking for the 17th time in the wake of a domestic mass shooting, Obama once again called for Americans to unite -- especially ahead of two weeks of potentially turbulent political conventions.
We need to "temper our words and open our hearts," Obama said Sunday afternoon. "All of us. We need what we saw in Dallas this week," referring to the outpouring of support following the deaths of five officers there.
After spending the past week grappling with political and civil upheaval in the wake of the shootings in Dallas, Baton Rouge and St. Paul, Obama called on politicians speaking in the coming Republican and Democratic conventions to help the country move forward.
He said it was "so important that everyone focus on words and actions that can unite this country rather than divide it further," and cautioned against using the tragedies to score political points.
"Only we can prove that we have the grace and character and the common humanity to end this kind of senseless violence," Obama said.
Hillary Clinton called the shooting a "devastating assault" on police officers in Baton Rouge, saying it was "an assault on all of us."
Hillary's statement on the shooting in Baton Rouge. pic.twitter.com/4a0MVF3025— Hillary Clinton (@HillaryClinton) July 17, 2016
The presumptive Republican presidential nominee, Donald Trump, tweeted his condolences for the fallen officers while reiterating his call for "law and order."
We grieve for the officers killed in Baton Rouge today. How many law enforcement and people have to...https://t.co/pPNrzG8kEa— Donald J. Trump (@realDonaldTrump) July 17, 2016
Police on High Alert
Police in Boston, New York, Los Angeles, Chicago and New Orleans remain on high alert and have been ordered to patrol in pairs.
In New York City, the New York Police Department ordered officers to stay with their partners, effective immediately and until further notice.
"There are to be no solo foot posts citywide," the NYPD message said. "All uniform members of service shall arrive and remain on post together. All meals and personal breaks will also be taken in pairs. If the assigned post is considered integral to your command operations and you feel it should not be left unmanned during meal breaks, have that post back-filled. Police Officers on patrol should maintain a heightened level of awareness."
Baton Rouge Mayor Kip Holden told ABC News Monday morning that police agencies across the country "should be on alert" and urged citizens to be vocal about their support for law enforcement.
"Tell people in law enforcement and others that you love them every day," Holden said on GMA Monday. "Unfortunately, yesterday I had the bad experience of going into a hospital room and seeing the child of one of the officers that was slain. And that little girl said this: 'I know my daddy is not dead. My daddy is going to come home tonight.' That young girl, seeing what she said, and your heart basically in your hands and all kinds of emotions going through your stomach.
"Make sure we embrace [police]. Let them know we love them. Let them know we appreciate what they are doing," Holden added.
Agencies across the country have noted an uptick in violent speech targeted at law enforcement in the wake of the recent shootings. In a notice issued more than a week prior to Sunday's attack in Baton Rouge, the FBI cited social media posts calling for a "purge" of cops in that city.
The warning, issued by the FBI's New Orleans field office on July 7, mentioned "threats to law enforcement and potential threats to the safety of the general public" stemming from the July 5 shooting of Alton Sterling.
Copyright © 2016, ABC Radio. All rights reserved.