President Barack Obama urged unity after a shooting on Sunday that killed three police officers in Baton Rouge, Louisiana ― the fourth incident of gun violence in just two weeks that he has addressed publicly.

Speaking from the White House, Obama called on Americans to tamp down on divisive rhetoric, particularly given the Republican and Democratic conventions occurring in the next two weeks, “where our political rhetoric tends to be more overheated than usual,” he said.

“Everyone, right now: focus on words and actions that can unite this country rather than divide it further,” he 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 condemned the Baton Rouge attack, which also left three officers injured. It was the second attack on police in recent days.

“We as a nation have to be loud and clear that nothing justifies violence against police officers,” he said. “Attacks on police officers are attacks on all of us.”

Less than a week ago, he noted, he spoke at the memorial service for five police officers shot and killed in Dallas.

“This has happened far too often, and I’ve spent a lot of time with law enforcement this week,” he said.

On July 7, a visibly frustrated Obama condemned the shootings of two black men at the hands of police, Alton Sterling in Baton Rouge and Philando Castile in Minnesota. It is unclear if Sunday’s shooting of officers was linked to either incident.

Just a day later, the president again addressed the nation when five police officers were ambushed and killed after a Black Lives Matter protest in Dallas. He reiterated his anger at the officers’ memorial service last week, noting that he had spoken at “too many” vigils for the victims of mass shootings.

Obama’s call for unity on Sunday echoed statements that he has made time and time again, reminding Americans that police departments face many dangers and challenges but must also work to reduce bias and discrimination. He has also emphasized the need to temper feelings rather than give in to division.

“Only we can prove that we have the grace and character and the common humanity to end this kind of senseless violence,” he said Sunday. “Only we can prove, in our own actions and words, that we will not be divided, even if we have to do it again and again and again.”