President Obama called for unity Sunday, after a shooting left three police officers dead and three more wounded in Baton Rouge, La.

"We have our divisions and they are not new," he said Sunday afternoon from the White House.

ADVERTISEMENT

"It is so important that everyone, regardless of race or political party or profession, regardless of what organizations you are a part of, everyone, right now, focus on words and actions that can unite this country rather than divide it further,” he said.

Baton Rouge authorities confirmed Sunday that three officers were killed and three more were injured, one critically, when responding to a report of a man armed with an assault rifle at around 8:45 a.m.

The man believed to be responsible for the shooting, Kansas City, Mo., resident Gavin Long, age 29, was shot and killed by police at the scene. The violence in Baton Rouge follows the shooting death of five police officers last week in Dallas. 

Baton Rouge was also in the spotlight last week, after police shot and killed a black man, Alton Sterling, and the aftermath was caught on video. 

Obama said his message of unity is important especially as the Republicans and Democrats gear up for their political conventions and political rhetoric tends to be "more overheated than usual."

He said the country doesn't need inflammatory rhetoric or careless accusations.

"We need to temper our words and open our heats — all of us," Obama said.

"We need what we saw in Dallas this week as the community came together to restore order and deepen unity and understanding."

People need to work together, Obama said, to reduce violence in communities across the country.

"It is up to all of us to make sure we are part of the solution not part of the problem," he said.

"Only we can prove, through words and through deeds, that we will not be divided and we're going to have to keep on doing it, again and again and again," he continued.

"Only we can prove that we have the grace and the character and the common humanity to end this kind of senseless violence, to reduce fear and mistrust in the American family."

The president said nothing justifies violence against law enforcement and said that "justice will be done."

In a Sunday night statement, Vice President Biden called the shooting "despicable. It’s cowardly. And it's an attack on our very way of life and rule of law."

"Police officers are an incredible group of men and women. We owe them our gratitude and a commitment not to let others divide us. That's not who they were, that's not who they are."

Updated 8:42 p.m.