WASHINGTON (AP) -- President Barack Obama angrily denounced Donald Trump's anti-Muslim rhetoric on Tuesday, blasting the views of the presumptive Republican presidential nominee as a threat to American security and a menacing echo of some of the most shameful moments in U.S. history.
Obama's rebuke was his most searing yet of the man seeking to take his seat in the Oval Office. While the president has frequently dismissed Trump as a buffoon or a huckster, this time he challenged the former reality television star as a "dangerous" threat to the nation's safety, religious freedom and diversity.
"That's not the America we want. It does not reflect our democratic ideals," Obama declared in remarks that had been scheduled as simply updating the public on the counter-Islamic State campaign.
Obama walked listeners through a familiar litany of battlefield successes, but then came another message. Growing more animated as he spoke, Obama said Trump's "loose talk and sloppiness" could lead to discrimination and targeting of ethnic and religious minorities.
"We've gone through moments in our history before when we acted out of fear and we came to regret it," Obama said. "We've seen our government mistreat our fellow citizens and it has been a shameful part of our history."
Trump responded by suggesting that Obama is too solicitous of enemies.
"President Obama claims to know our enemy, and yet he continues to prioritize our enemy over our allies, and for that matter, the American people," the candidate said in a statement. "When I am president, it will always be America first."
At a fiery rally hours later in Greensboro, North Carolina, Trump said the president appeared angrier at him than he was at the Orlando gunman. "That's the kind of anger he should have for the shooter and these killers that shouldn't be here," Trump told the crowd.
Sunday's mass shooting in Orlando, Florida, has set off a new round of debate over counterterrorism, gun control and immigration -- one that has exposed the political parties' starkly different approaches to national security. The presumed gunman was an American-born citizen whose parents came to the U.S. from Afghanistan more than 30 years ago.
Trump has used the carnage to renew his call to temporarily ban foreign Muslim from entering the country, and added a new element: a suspension of immigration from areas of the world with a proven history of terrorism against the U.S. and its allies.
The Democrats' presumptive presidential nominee, Hillary Clinton, also let out a full-throated response that Trump's speech should disqualify him.
"We don't need conspiracy theories and pathological self-congratulations," Clinton said Tuesday, in a speech that closely tracked Obama's. "We need leadership and concrete plans because we are facing a brutal enemy."
Both Clinton and Obama turned up the heat on Republicans, some of whom have squirmed with discomfort this week at the first glimpses of how their new leader handles national crises.
As Obama argued that Trump's ban on immigration would lead Muslim-Americans to believe their government had betrayed them, he urged Republicans to denounce the policy.
"Where does this stop?" Obama said. "Are we going to start treating all Muslim-Americans differently? Are we going to start subjecting them to special surveillance? Are we going to start discriminating against them because of their faith? ... Do Republican officials actually agree with this?"
For some, the answer was plainly no. House Speaker Paul Ryan of Wisconsin, the highest-ranking elected GOP official, emphasized his opposition, saying he did not think such a ban was "in our country's interest" or "reflective of our principles not just as a party, but as a country."
Republicans have instead hoped to focus on a broader criticism of the president's counter-terrorism strategy as unfocused, ineffective and too soft of Islamic institutions and governments that support terrorism.
Obama directly addressed that argument, specifically taking on the Trump charge that his policies have been hampered by his refusal to use the phrase "radical Islam" when describing the forces urging attacks like the one in Orlando. Republicans have said the careful parsing is a sign of over-caution and political correctness that demonstrates denial about the groups responsible for the extremist view.
Trump said Sunday the president should resign if he does not use the phrase.
Obama dismissed the criticism as a "political talking point" and "not a strategy," and he pointed to his success in tracking Osama bin Laden and other leaders, as evidence of his success.
"There is no magic to the phrase 'radical Islam,'" he said. "Someone seriously thinks that we don't know who we are fighting? If there is anyone out there who thinks we are confused about who our enemies are -- that would come as a surprise to the thousands of terrorists who we have taken off the battlefield."
Obama struck a more bipartisan tone in speaking to members of Congress and their families during a picnic Tuesday evening on the South Lawn.
"Obviously this has been a difficult week for America because all of us are still grieving for those who were lost in Orlando," he told the several hundred people in attendance.
Obama said he understood that it's a contentious time in the political life of the nation, but he said democracy has always been messy. In the end, he said, the "things that really matter in our lives, they can't be captured by a party label."
Associated Press writers Lisa Lerer in Cleveland and Donna Cassata in Washington contributed to this report.