Gregory Korte

USA TODAY

WASHINGTON — President Obama delivered a full-throated defense of a liberal immigration policy Tuesday, saying,America betrays its history and its values when it fails to welcome those fleeing poverty, hunger, war and persecution from all over the world.

Speaking at a naturalization ceremony for 31 new American citizens at the National Archives, Obama compared the current wave of immigrants to the waves of German, Scottish, Irish and German immigrants of the past.

"You don’t look alike. You don’t worship the same way, but here, surrounded by the very documents whose values bind us together as one people, you've raised your hands and sworn a sacred oath. I'm proud to be among the first to greet you as our fellow Americans," Obama told the newly sworn citizens.

But Obama's speech was more than a welcoming. It was a not-so-subtle retort to Republican presidential candidates — notably, Donald Trump — who have promised to put a halt to Muslim refugees and to deport the undocumented Mexican and Central American immigrants already here.

White House Press Secretary Josh Earnest said the president's speech does "stand in stark contrast to the rhetoric and divisiveness that will be on full display at the Republican debate tonight,"

Obama said immigration was at the core of the American identity. "In the Muslim immigrant today, we see the Catholic immigrant of a century ago," Obama said. "In the Syrian refugee of today, we should see the Jewish refugee of World War II."

Obama said those immigrants of yesterday also fled persecution and war, and "their paperwork wasn’t always in order."

He recounted a litany of past abuses of immigrants, silently comparing them to today's environment: The forced immigration of African slaves, anti-Catholic discrimination exhibited in signs reading, "No Irish need apply," and the internment of Japanese Americans during World War II.

"We succumbed to fear. We betrayed not only our fellow Americans, but our deepest values. It's happened before," Obama said. "Those who betrayed those values were themselves the children of immigrants. How quickly we forget. One generation passes, two generations pass and suddenly we don’t remember where we came from."