U.S. President Barack Obama on Saturday rejected the notion that this week's stunning violence is a signal that the U.S. has returned to some of the darkest days of its past, saying that as painful as the killings of police and black men were, "America is not as divided as some have suggested."

"Americans of all races and all backgrounds are rightly outraged by the inexcusable attacks on police, whether it's in Dallas or anyplace else," Obama said from Warsaw, Poland, where he attended a NATO summit. His comments come amid reports of violence and threats targeting police officers in the U.S.

"That includes protesters. It includes family members who have grave concerns about police conduct and they've said that this is unacceptable," Obama added. "There's no division there."

The comments marked the third time in as many days that Obama has spoken, from a distance, about the police-involved fatal shootings of black men in Louisiana and Minnesota that were immediately followed by a sniper attack in Dallas that killed five police officers Thursday night. Seven officers and two civilians were also injured.

"This has been a tough week," the president said.

Dallas mourns

The Dallas shooting has spurred an outpouring of support for police, not only in Texas but hundreds of miles away.

Around the country, people have showed up at local departments with flowers, sent social media messages or called to say thanks. They delivered coffee, pizzas, cakes and moments of solace for officers grieving after the deadliest day for U.S. law enforcement since the Sept. 11, 2001, attacks.

Two patrol cars serving as a memorial outside of Dallas police headquarters were adorned with flowers, signs and flags by some of the people pausing to pay their respects.

John Fife, with his ball cap in hand, passed a red rose to an officer sitting in a vehicle guarding those headquarters. In another corner of the country, a Seattle officer accepted a matching flower from Jasen Frelot, one of several people from the faith community there who set out to show police support.

‘Not who we want to be as Americans’: Obama on Dallas shootings1:28

Obama said the Dallas shooter, an Army veteran who was later killed by police, was a "demented individual" who does not represent black Americans, any more than a white man accused of killing blacks at a church in Charleston, S.C., represented whites.

The Dallas shooter, Micah Johnson, described his motive during negotiations and said he acted alone and was not affiliated with any groups, said Dallas Police Chief David Brown.

Johnson said he wanted to exterminate whites, "especially white officers," officials said.

Violence, threats still aimed at police officers

In Washington, Attorney General Loretta Lynch called for calm following the Dallas shooting, saying recent reports of violence can't be allowed to "precipitate a new normal" and encouraged protestors to continue peacefully.

Lynch says protesters concerned about killings by police should not be discouraged "by those who use your lawful actions as a cover for their heinous violence."

The attacks on police following the events in Dallas included a Georgia man who authorities say called 9-1-1 to report a break-in, then ambushed the officer who came to investigate. That sparked a shootout in which both men were wounded but expected to survive.

APTOPIX Police Shootings Lynch

Attorney General Loretta Lynch on Saturday called for peace and calm in the wake of the attack in Dallas, saying violence is never the answer. (Carolyn Kaster/Associated Press)

In Missouri, a motorist shot an officer at least once as the officer walked back to his car during a traffic stop, police said. The officer was hospitalized in critical condition.

A Tennessee man accused of shooting indiscriminately at passing cars and police on a highway told investigators he was angry about police violence against black Americans, authorities said.

Police in Louisiana say a man was jailed after posting a social media video in which he says he wants to shoot and kill a police officer. Police in Bossier say the man made the video while sitting in a car that was behind a police unit at a fast-food drive-through.

A Dallas police spokeswoman said the department received an anonymous threat against law enforcement across the city on Saturday and has tightened security.

Sr. Cpl. Monica Cordova called the measures precautionary.

An armoured vehicle was moved to near the department's downtown headquarters late Saturday afternoon and heavily armed officers were seen walking nearby. But members of the public were still able to walk about freely around the building.

Obama vows to tackle gun, policing issues

Obama said he would visit Dallas "in a few days" to pay respects and mourn with the stricken Texas city.

He said that while "there is sorrow, there is anger, there is confusion" about how the U.S. moves forward, "there's unity in recognizing that this is not how we want our communities to operate. This is not who we want to be as Americans and that serves as the basis for us being able to move forward in a constructive and positive way."

"So we cannot let the actions of a few define all of us," Obama said.

The episode in Dallas began Thursday evening while hundreds of people were gathered to protest the police killings of two more black men: Philando Castile, who was fatally shot near St. Paul, Minnesota, and Alton Sterling, who was shot in Louisiana after being pinned to the pavement by two white officers.

‘Police continue to reach out to communities’: Obama0:56

Obama said he planned to convene a White House meeting next week with police officers, community and civil rights activists and others to talk about next steps.

He said the "empathy and understanding" that Americans have shown in responding to the events of the past few days, including Dallas police officers as they came under attack, had given him hope.

"That's the spirit that we all need to embrace. That's the spirit that I want to build on," Obama said.

But Obama made clear that he will continue to speak out about the need to tighten access to guns in the United States, steps the Republican-controlled Congress has refused to support.

"I am going to keep on talking about the fact that we cannot eliminate all racial tension in our country overnight," he said. "We are not going to be able to identify, ahead of time, and eliminate every madman or troubled individual who might want to do harm against innocent people. But we can make it harder for them to do so."

Watch Obama's full speech about the Dallas shooting at the NATO summit below.

Obama addresses violence in U.S. from NATO summit8:00