President Obama sought to assure Americans that despite the "tough week" for the country, the nation still remains united, contrary to the fears of some that racial tensions -- in the wake of recent deadly shootings -- are boiling over and exposing deep divisions in the United States.
"As painful as this week has been, I firmly believe that America is not as divided as some have suggested," the president said Saturday, in a closing address to the NATO summit in Warsaw, Poland.
Americans of all races and all backgrounds are "rightly outraged by the inexcusable attacks on police," Mr. Obama noted, including protesters and family members who have "grave concerns about police conduct."
"They have said this is unacceptable. There's no division there," he added. Americans of all races and backgrounds are also "rightly saddened" by the deaths of Alton Sterling, Philando Castile and other black civilians at the hands of police system, the president said, along with the "larger persistent problems" of racially discriminatory practices in the criminal justice system.
"There is sorrow, there is anger, there is confusion about next steps, but there is unity in recognizing that this is not how we want our communities to operate," Mr. Obama said. "This is not how 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."
He denied that the events of this past week indicated a return to the violent upheaval of the 1960s during the civil rights movement.
"When we start suggesting that somehow there's this enormous polarization, and we're back to the situation in the '60s -- that's not true," he said. "You're not seeing riots and you're not seeing police going after people who are protesting peacefully. You've seen almost uniformly peaceful protests and you've seen uniformly police handling those protests with professionalism."
The president urged Americans to not "let the actions of a few define all of us," saying that the "demented individual" who carried out the attack in Dallas was "no more representative of African-Americans" than Dylann Roof, the suspect in the Charleston, South Carolina church shooting, was of white Americans or Omar Mateen, the gunman in the Orlando nightclub massacre, was of Muslim Americans.
"They don't speak for us - that's not who we are," the president said. Asked later on what caused the Dallas attacker to open fire on police officer, he added that it's "very hard to untangle the motives of this shooter."
"Although he may have used as an excuse his anger about previous incidents," he observed, "in no way does that represent what the overwhelming majority of what Americans think. Americans to a large degree want to make sure that we have a police force that is supported."
Asked about the recurring problem of mass shootings in the U.S. and possible gun control legislation, the president continued pushing for such measures.
"We cannot eliminate all racial tension in our country overnight," he acknowledged. Nor would it be easy to "eliminate every madman or troubled individual who may want to do harm against innocent people."
"But we can make it harder for them to do so" with gun control, the president said, mentioning the difficulty of policing the Dallas protests in the "open carry state" of Texas where numerous people in the crowd were holding firearms.
"If you care about the safety of our police officers, then you can't set aside the gun issue and pretend that that's irrelevant," he said.
The president previewed his plans for next week as well, discussing his visit to Dallas, Texas at the invitation of Dallas Mayor Mike Rawlings and his plans to gather together together a task force to address criminal justice issues at the White House.
"The majority of Americans have acted with empathy and understanding," he said. "That's the spirit we all need to embrace. That's the spirit I want to build on."
After the fatal shootings earlier this week, the president is expected to return to the United States one day earlier than planned, cutting short his trip to Europe and returning to Washington Sunday.
In the president's wide-ranging press conference, Mr. Obama also touched on the recent conclusion of a Department of Justice investigation in Hillary Clinton's private email server.
While he said he would "continue to be scrupulous" in declining to answer specific questions of the probe, the president commended FBI director James Comey for his handling of the investigation.
"I think Director Comey could not have been more exhaustive," the president said, adding that Comey "was presenting to Congress for hours on end."
Responding to a broader query about how he perceived Comey's criticism of how the State Department handles classified information, Mr. Obama admitted: "I am concerned" and "it reflects a larger problem in government."
Addressing the end of the NATO summit -- the president's last before he leaves the Oval Office -- Mr. Obama reaffirmed "the unwavering commitment" of the U.S. to the security and common defense of Europe.
"One of my priorities has been to strengthen our alliances," he said. "We have delivered on that promise. We have increased our presence in Europe. NATO membership remains open to those who can meet our standards."
He assured the group that while his administration had not supported the British referendum to leave the Europe Union, the U.S. would still remain a major partner of both the United Kingdom and the EU. He shot down hope that the British would reconsider their vote and predicted instead that Brexit "is gonna stick."