At least three police officers and a suspect have been shot and killed in Baton Rouge, the second largest city in the US state of Louisiana.

The officers in Baton Rouge were responding to a call of a man with a gun when shots were fired. Two Baton Rouge police officers and one sheriff's deputy were killed.

One gunman is dead and police believe he was the only one involved in the attack, Mike Edmonson, superintendent of the Louisiana State Police, said in a press conference.

"We do not have an active shooter scenario in Baton Rouge," Edmonson said.

Multiple US news outlets identified the suspected gunman in Sunday's fatal shootings of law enforcement officers in Baton Rouge as Gavin Long. CBS News said Long was a black male from Kansas City, Missouri.

It was not immediately clear whether there was a link between the shootings and the recent unrest over the police killings of black men in Baton Rouge and Minnesota.

Police did not give any information about a possible motive.

US President Barack Obama condemned the "cowardly" shooting and demanded an end to such violence.



"It is so important that everyone ... right now focus on words and actions that can unite this country rather than divide it further," Obama said.



"We don't need inflammatory rhetoric. We don't need careless accusations thrown around to score political points or to advance an agenda. We need to temper our words and open our hearts, all of us."



Obama has repeatedly called for racial unity.



"We as a nation have to be loud and clear that nothing justifies violence against law enforcement," Obama told reporters at the White House.



"This has happened far too often."

In an interview with national broadcaster NBC, Baton Rouge Mayor Kip Holden confirmed that three officers had been killed in the shooting near the city's police headquarters on Sunday.

Three other officers were reportedly injured and hospitalised.

"All indications at this point are that it was an ambush. One officer was at a convenience store ... and a woman approached him and said there was a man around the back of the store with a weapon. When he went to investigate he was fired upon ... it looks like a it was a planned ambush at this point," local journalist Bill Profta told Al Jazeera.

Al Jazeera's Rosiland Jordan reported that one witness had seen a "man dressed all in black" and that he "started firing indiscriminately between a service station and a convenience store".

Louisiana Governor John Bel Edwards referred to the incident as "an unspeakable and unjustified attack on all of us".

He said in a statement: "Rest assured, every resource available to the State of Louisiana will be used to ensure the perpetrators are swiftly brought to justice."

Republican presumptive candidate Donald Trump, writing on Facebook, demanded "law and order" following the shooting incident.

Protests

Baton Rouge became the scene of large protests against police brutality after officers shot dead 37-year-old Alton Sterling on July 5.

Police officers killed Sterling outside a supermarket, claiming he had a gun. The father of five, whose funeral was held on Friday, had been selling CDs.

Footage of the moment Sterling was killed was captured on a mobile phone, which contains images some readers may find distressing, was circulated online - sparking outrage and then protests.

OPINION: Structural racism in the US won't diminish with time

On Wednesday, Baton Rouge Police Department and state law enforcement agents were sued in a federal court after arresting at least 180 protesters in protests against Sterling's killing.

The suit, filed by activist groups, accuses the police and law enforcement officers of "excessive force" and violating demonstrators' right to freedom of expression, among other allegations.

Alexis Phillips, a 30-year-old Baton Rouge resident who has participated in protests, said the killing of Alton Sterling was the point when people were "fed up" with discriminatory police violence.

"We live in an outright racist city," she told Al Jazeera. "The killing of Alton Sterling was only the catalyst ... the [boiling] point for our black community and its allies. Something has to change."

Black Lives Matter

Sterling's killing was followed the next day with another police shooting. An officer killed a 32-year-old black man, Philando Castile, at a traffic stop in the midwestern US state of Minnesota. The aftermath of the shooting was also captured on video and streamed live by Castile's girlfriend on Facebook.

The deaths sparked outrage and protests in many cities across the US.

Last week, five white police officers were shot dead at one such protest in Dallas, Texas.

READ MORE: Obama on Dallas shootings - a wake-up call for America on racism?

Police identified Micah Xavier Johnson, 25, as the suspect and said he had set out to kill white people. Police shot and killed Johnson after the incident.

The Black Lives Matter movement - which campaigns against police killings of African Americans - disavowed the killing of the officers and said in a statement it stands for "dignity, justice and respect".

The Guardian has documented at least 587 people killed by police across the US so far this year. From that total, 145 - nearly 25 percent - were black, although black Americans constitute only around 13 percent of the country's total population.