Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

At least three Baton Rouge police officers were killed and three others injured Sunday morning, the city's mayor and the East Baton Rouge Parish Sheriff's Office said.

At least one suspect is dead. Law enforcement officials initially said they believed that two other suspects were at large, but at a news conference Sunday afternoon officials said the deceased suspect was likely the only shooter.

A senior law enforcement official said that suspect wore black fatigues and was armed with a rifle.

By 3 p.m. (CT) Sunday, state police said there was "no active shooter" situation.

Several law enforcement officials told NBC News that the man shot and killed in the shootout with police was identified as Gavin Long, of Kansas City, Missouri, born on July 17, 1987 — meaning he turned 29 on the morning of the shooting.

The attack comes less than two weeks after the fatal shooting of a black man by police sparked protests in Baton Rouge, turning the city into the latest flashpoint in the ongoing debate over law enforcement tactics.

The officers were responding to a call of shots fired when they were gunned down in an apparent "ambush" around 9 a.m. local time, said Baton Rouge Mayor Kip Holden.

Two of the officers killed were from the Baton Rouge Police Department. They were identified as Officer Montrell Jackson, 32, a 10-year veteran, and Matthew Gerald, 41, who had been serving for less than a year, officials said.

This undated photo taken from Facebook shows Baton Rouge Police Officer Montrell Jackson. via Facebook

Also killed was Brad Garafola, 45, a 24-year veteran of the East Baton Rouge Sheriff's office, officials said

"These men are husbands, fathers, sons and brothers," Sheriff Sid Gautreaux said. "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. We will get through this together as a family and as a community."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

East Baton Rouge Sheriff's Deputy Brad Garafola, 45. East Baton Rouge Sheriff's Office

A 41-year-old Baton Rouge police officer suffered non-life threatening injuries, while two East Baton Rouge Sheriff’s Office Deputies, aged 41 and 51, were injured. The 41-year-old was in critical condition, and “absolutely fighting for his life,” said Gov. John Bel Edwards.

Multiple police units were stationed at Our Lady of the Lake Regional Medical Center, where the stricken officers were believed to be undergoing treatment at a trauma center, The Associated Press reported.

Matthew Gerald, 41. Baton Rouge Police Department

An AP reporter who was at the scene saw police vehicles with lights flashing massed about a half-mile from the police headquarters on Airline Highway. Police armed with long guns on the road stopped at least two vehicles driving away from the scene and checked their trunks and vehicles before allowing them to drive away, the reporter said.

Marquis Gibson, an eyewitness, was at the Hammond Aire Plaza mall when he heard shots and ran inside. “Officers were falling down and hiding,” he told NBC News.

The shooter, Long, appeared to run a website and YouTube channel called "Convos With Cosmo," where Cosmo was his nickname for himself. The site's domain was registered to Long's home address.

In several posts Long/Cosmo references police shootings of black men and claims that, as an "alpha" male, he planned to stand up to "injustice."

In one video just posted on July 8, he claims he's "not affiliated" with any movement or individual. "I want to let ya'll, if anything happens with me ... don't affiliate me with nothing ... I'm affiliate with the spirit of justice, nothing more nothing less."

Long was also Marine sergeant who served from 2005-2010, who was deployed to Iraq from June 2008 to January 2009, according to military records obtained by NBC News. He did not appear to have any major criminal record which would have prevented him from owning a firearm.

President Barack Obama addressed the killings from the White House on Sunday afternoon, saying they were "an attack on all of us."

"We have our decisions, and they are not new," Obama said. The country needs to "focus on words and actions that can unite this country rather than divide it further."

#lagov on the shooting of law enforcement officers in Baton Rouge today: pic.twitter.com/BU3B4Iznbe — Gov John Bel Edwards (@LouisianaGov) July 17, 2016

“It’s unspeakable that these men risking their lives to protect and serve this community were taken out the way that they were,” said Gov. Edwards.

“The violence, the hatred just has to stop,” Edwards said. "And it's in times like this, I wish the command of the English language that I have were adequate to the task to convey the full range of the emotions I am feeling.”

“An attack on one of us is an attack on all of us,” he said.

In a statement, New Orleans Mayor Mitch Landrieu said his thoughts and prayers were with the officers "targeted in this brazen attack on law enforcement."

Baton Rouge has been roiled by protests since white officers shot and killed Alton Sterling, a 37-year-old black man, on July 5. Four people were arrested last week in an alleged plot to kill police officers, and a fifth was arrested Saturday.

Nationwide protests erupted following Sterling’s death and the killing of another black man, Philando Castile, at the hands of a police officer in Minnesota. At one such protest in Dallas, a sniper opened fire on police officers, killing five and injuring more.