President Obama speaks during an interfaith memorial service for the victims of the Dallas police shooting at the Morton H. Meyerson Symphony Center on July 12 in Dallas. (Mandel Ngan/AFP/Getty Images)

President Obama on Friday condemned the terrorist attack in Paris that killed 84 people and denounced politicians who have suggested that Muslims should be subjected to extra scrutiny in the United States because of their religion.

“In the wake of last night’s attacks we’ve heard more suggestions that all Muslims in America be targeted or tested for their beliefs,” Obama said. The president appeared to be referring former House speaker Newt Gingrich’s call on Fox News to deport all Muslims who follow sharia law.

Without mentioning Gingrich by name, Obama called his suggestion of a religious test “repugnant and an affront to everything we stand for as Americans.”

“We cannot give in to fear or turn on each other or sacrifice our way of life,” Obama said. “We cannot let ourselves be divided by religion because that is exactly what the terrorists want.”

The president was speaking at a reception for the diplomatic corps in Washington and met privately with the French ambassador to express his condolences and offer support prior to speaking publicly. In his public remarks, Obama called the attack “tragic” and “sickening” and vowed that the United States would continue to press its campaign against the Islamic State. He also expressed support for the family of Sean and Brodie Copeland, a Texas father and his 11-year-old son who were killed in Nice.

“They are grieving and need all the love and support of our American family as they grapple with an unimaginable loss and try to get through what are going to be very difficult days,” Obama said.

“We will not relent. We are going to keep working together to prevent attacks and defend our homeland,” he said.  “We are going to destroy this vile terrorist organization.”

There has been a string of terror attacks — some directed by the Islamic State and others merely inspired by the group — that have in recent weeks hit the United States, Turkey, Bangladesh, Iraq and Saudi Arabia. Obama described the individuals and networks that have carried out the attacks as “an affront to all of our humanity.”

The president’s remarks, though, were most striking for his concern about how some politicians in the United States and abroad were reacting to the bloodshed. Obama warned against those who seek to divide the world by tribe, ethnicity, faith or skin color.

“Those impulses exist in all our countries,” he said. He urged diplomats to promote pluralism, the rule of law and the freedom of religion, speech and assembly.

“On this planet of more than 7 billion people, the hatred and violence of a few ultimately is no match for the the love and decency and hard work of people of good will and compassion so long as we stand up for those values,” Obama said.

“We come here with heavier hearts than normal. Overnight in Nice, we witnessed another tragic and appalling attack on the freedom and peace that we cherish,” he added. “Today our hearts are with the people of France and with all the innocent men, women and so many children who were hurt or killed in this sickening attack.”