Authorities said Monday that they believe the gunman who opened fire in Baton Rouge, Louisiana, a day earlier, killing three police officers and injuring three others before he was fatally shot by a SWAT team, was specifically after law enforcement officers in the city.

“There is no doubt whatsoever that these officers were intentionally targeted and assassinated,” said Col. Michael Edmonson, superintendent of the Louisiana State Police, at a news conference. “It was a calculated act.”

Police say they believe that after the ambush, which came less than two weeks after five officers were killed in Dallas, the attacker could have gone on to continue the violent rampage elsewhere if a Baton Rouge officer had not taken him down with a shot fired from more than 100 yards away.

During the Monday news conference, which lasted for nearly an hour, officials offered a remarkably detailed and chilling narrative of the shooting, much of it drawn from video recordings that Edmonson said captured “the sheer brutality of the shooting.”

Authorities used a map to retrace the gunman’s movements, describing how the attacker walked and drove through an area packed with businesses, ignoring civilians and instead focusing his fire on officers he encountered. One sheriff’s deputy injured in the shooting remained in “very critical condition,” East Baton Rouge Parish Sheriff Sid Gautreaux III said.

Autopsies conducted Monday found that the deaths of all three officers were homicides caused by multiple gunshot wounds, said William “Beau” Clark, the East Baton Rouge Parish Coroner.

The gunman’s autopsy would be conducted on Tuesday, Clark said.

Edmonson said the gunman – Gavin Long, a black man and former Marine from Missouri who had posted videos online seemingly endorsing violence as a way to push back against law enforcement – had been in Baton Rouge for “several days” before the shooting attack. He did not say if Long participated in any protests that erupted after police fatally shot a black man named Alton Sterling earlier this month.

While investigators continue tracing Long’s movements leading up to his first encounter with police at 8:40 a.m. on Sunday, they were also still trying to unpack what motivated the shooting.

MAYOR: GUNMAN PLANNED MORE KILLING

“Why did he come to Baton Rouge?” Edmonson said of questions they hope to answer. “Why did he pick Baton Rouge, why did he pick that location right there, and why did he kill police officers?”

Police also believe that the gunman, who had two rifles and a handgun with him at the time of the attack, would have gone on to kill other law enforcement officers if he was not stopped.

“After he was finished here, I have no doubt he was headed to our headquarters, and he was going to take more lives,” Baton Rouge Mayor Carl Dabadie, Jr. said Monday.

During the briefing Monday, Dabadie referred to the criticism authorities in Baton Rouge have received for the aggressive police response to protests that erupted there after Sterling’s death.

“Our ‘militarized tactics,’ as they’re being called, saved lives here,” Dabadie said. “That shot, that our SWAT team made, was a hell of a shot. But it had to be made.”

The Louisiana State Police say they do not believe Long made any 911 calls to draw authorities to the area, and instead are looking at whether he knew police officers came through that location to go to the gas station or get coffee.

POLICE EXPLORING GUNMAN’S CONNECTIONS

Investigators are also still working to trace the guns Long had with him on Sunday as well as the path of a rented Chevy Malibu with Missouri plates recovered at the shooting scene.

Officials believe that Long acted alone, but say they are continuing to explore any possible connections Long may have had to people in Louisiana or Baton Rouge.

“He came here from somewhere else to do harm to our community, and specifically the law enforcement officers in our community,” Louisiana Gov. John Bel Edwards, D, said at the news conference Monday. “This was a diabolical attack on the very fabric of society.”

Long had lived in Kansas City and, according to a document filed with Jackson County, Missouri, last year, sought to change his name from Gavin Eugene Long to Cosmo Ausar Setepenra. In this document, filed with the Jackson County Recorder of Deeds and first reported by the Kansas City Star, Long claimed his nationality was “Washitaw.”

According to law enforcement officials, Long was carrying a Washitaw Nation membership card during the shooting on Sunday. Washitaw Nation is a black nationalist movement that was once targeted by the FBI, and federal courts have characterized it in the past as fictional.

The founder’s son told The Washington Post that he didn’t know Long and that the group doesn’t espouse violence.

The shooting came at a time of tension nationwide over race and policing, and it struck officers in a city that has seen some of the most heated protests against police officers in recent memory after Sterling’s death earlier this month, which was partially recorded on a video that was widely viewed online.

‘POLICE OFFICERS ARE AGAIN GRIEVING’

While police officers were again left on edge this week, activists strongly decried the shooting in Baton Rouge, which left people in Louisiana’s capital city feeling shaken and uneasy.

“American flags are again flying at half-staff across the country,” Attorney General Loretta Lynch said Monday. “Families are again mourning loved ones robbed from them by senseless violence. Police officers are again grieving for their friends. And all of us are again heartbroken at the news of yet another tragedy; shocked by such callous disregard for human life; and dismayed at yet another instance of violence tearing at the fabric of our nation.”

President Obama on Monday ordered flags in the United States flown at half-staff until sunset on Friday to honor the officers killed in Baton Rouge, echoing an order he gave 10 days earlier to honor the police officers in Dallas

Edmonson, speaking on Sunday, had detailed just how quickly the event unfolded, describing an incident that ended in less than 10 minutes. He said police responded to a report of an armed man at about 8:40 a.m., and that four minutes later officers were reported down. Four minutes after that, the gunman was killed, he said.

On Monday, he outlined more about the gunman’s specific movements during the attack, while police also released still images showing Long wielding a rifle as he made his way around the businesses.

“There were citizens walking through all through the area, he . . . completely dismissed every single one,” Edmonson said. “His intensions were accurate, and they were engaging, and they were all aimed at police officers.”

Edmonson retraced the steps that Long took on Sunday morning. At one point before the gunfire, Long approached a police car in an armed posture, Edmonson said, his gun up as if ready to shoot, only to leave after seeing no one was in there. He then drove his car up Airline Highway, further along the businesses, and parked near the Fitness Expo before going on to confront officers.

He fatally shot one, wounded another, and continued his rampage, Edmonson said. At one point, a deputy sheriff went to his car to run the plates on Long’s car, only for Long to come up to the car and begin firing, hitting the deputy in his torso.

“That’s the one that’s fighting for his life right now,” Edmonson said.

Gautreaux said the gunman would’ve likely killed at least two other officers in the area if Baton Rouge SWAT had not arrived. The SWAT team member killed Long with an improbable shot, Gautreaux said, saying that the officer “had to shoot through structure” to hit the attacker.

Sunday was Long’s 29th birthday. Before the shooting rampage, he had served five years in the Marine Corps as a data network specialist, leaving active duty in 2010 as a sergeant, according to military records.

These records state 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, Calif., and Okinawa, Japan, during his military career. At least one of the officers killed Sunday – Matthew Gerald – was also a veteran.

A University of Alabama spokesman said that Long attended the school for a semester in the spring of 2012, adding that Long had no interactions with university police during this time there.

Before that, Long got a degree from a community college in Texas. Central Texas College said Monday that Long attended the school at a site it had at a Marine Corps Air Station in San Diego, and through online education between 2007 and 2011. Long got an associate of arts degree in general studies from the college, school records show.

Long also left behind a social media trail showing that he apparently believed that black people had to physically resist mistreatment from authorities, saying that sometimes it was necessary “to go to war.” After five Dallas police officers were gunned down this month by a man who authorities said was angered by police killings, Long posted a video on YouTube saying that he was “not gonna harp on that . . . it’s justice.”

A report from SITE Intelligence Group, which monitors extremist behavior online, said that Long’s social media trail showed that “he consistently digested conspiracy theories and sovereign citizen media,” referring to a group that believes the government operates illegally. Officials have warned for years that antigovernment groups pose a threat to law enforcement.

Mark Pitcavage, a senior research fellow at the Anti-Defamation League’s Center on Extremism, said he first heard of the Washitaw Nation about 20 years ago. The group emerged as an offshoot of the sovereign citizen movement.

“Sovereign citizens rationalize the ability to disobey virtually any law, order, pact, you name it,” he 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.”

The Washitaw Nation’s roots can be traced to the northeast part of Louisiana, close to Monroe. The group’s founder, Empress Verdiacee Tiari Washitaw-Turner Goston El-Bey, wrote a book titled “Return of the Ancient Ones,” laying claim to the belief that she and others descended from ancient “Mound Builders” in the northern part of Louisiana, close to Monroe.

Long appeared to have interests in a number of movements, not just the Washitaw Nation. He espoused his beliefs about the importance of alpha-male dominance, along with spirituality and natural healing.

“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,” Pitcavage said.

In his postings online, Long frequently wrote under the handle “Cosmo” on an array of topics, calling himself a “nutritionist, life coach, dietitian, personal trainer, author and spiritual adviser.”

Records show he was married in 2009 and divorced in 2011, and his online videos and writings seem to suggest a reverence for black women. His book contains a special thank you to “the all-powerful, most beautiful, one and only Black woman.” Efforts to reach his ex-wife were unsuccessful.

Jenny Reese, a 34-year-old who practices an alternative therapy that promotes hands-on healing, said she met Long – who she knew as Cosmo – when he stopped by a Virginia Beach, Virginia, reiki center in February.

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

When Reese was told Monday morning that Cosmo appeared to be the Baton Rouge gunman, she said it was unexpected because he had seemed outgoing and chatty. “I’m very surprised because he seemed to be such a positive person,” she said. “He was trying to get out there and meet people.”

Police investigating the shooting in Baton Rouge said they had questioned and then released without charges two people from Addis, a town in West Baton Rouge Parish. They did not specify why these people were questioned. Relatives had said that Long was in Louisiana to celebrate his birthday.

“The violence, the hatred, just has to stop,” Edwards said at Sunday’s news conference. “We have to do better. An attack on one of us is an attack on all of us, and the people who carried out this act, the individuals, they do not represent the people of Baton Rouge, or the state of Louisiana.”

The officers killed Sunday were identified as Matthew Gerald, 41, a Marine and Army veteran who served in Iraq before joining the Baton Rouge police; Montrell Jackson, 32, also of the Baton Rouge police department, and Brad Garafola, 45, of the East Baton Rouge Parish Sheriff’s Office. They left behind grieving relatives and, between the three of them, had seven children, the youngest just four months old.

These officers were slain just 10 days after five police officers were slain in Dallas. And in successive days before the Dallas attack, police in Baton Rouge fatally shot Sterling outside a convenience store and officers outside St. Paul, Minnesota, shot and killed a man during a traffic stop, both high-profile incidents pushed into national headlines by graphic videos showing the encounters or the aftermath.

“Stop this killing. Stop this killing. Stop this killing,” said Veda Washington-Abusaleh, Sterling’s aunt.

After Baton Rouge police shot and killed Sterling, heated protests bubbled up in the city, and scores of demonstrators were arrested during showdowns with police officers wearing riot gear. This police response, which Dabadie referenced, has been criticized by demonstrators for being overly aggressive, and it prompted a lawsuit by civil liberties groups alleging that the police used excessive force.Still, officials have defended it as necessary. As an explanation, police said last week that they had received a threat against officers.

Police said that one person involved in stealing guns from a pawnshop had said his group was seeking to shoot officers, which authorities say they treated as credible enough to prompt their aggressive response to demonstrators.

“When a police officer is shot or assaulted, it makes every single citizen in the country a little less safe,” said Jim Pasco, executive director of the National Fraternal Order of Police, the country’s largest police union. “When police officers have to worry about citizens committing unprovoked acts of violence against them it makes it more difficult for them to interact with citizens and that is a key factor in law enforcement.”

The deaths in Baton Rouge pushed the total number of officers fatally shot in the line of duty to 30 so far this year – up from about 16 at this point last year. The average midyear total, according to FBI data, is about 25.

Since 2005, according to FBI data, about 20 percent of fatal shootings of police have been ambushes.

This year, the total number of line-of-duty deaths has spiked significantly just this month: Two bailiffs, both deputized by the sheriff there, were killed in a Michigan courthouse last week, not long after the five police officers were fatally shot in Dallas.