Obama made the remarks in a commencement speech at City College of New York, in Harlem, praising the school for having a diverse student body, which she said “some folks” fail to value.

"They seem to view our diversity as a threat to be contained rather than as a resource to be tapped," she said. "They tell us to be afraid of those who are different, to be suspicious of those with whom we disagree.”

She also said Americans “don't build up walls to keep people out because we know that our greatness has always depended on contributions from people who were born elsewhere but sought out this country and made it their home."

Trump has vowed, if elected, to build a wall along the entire southern U.S. border to keep out illegal Mexican immigrants, including “rapists" and “drug dealers.”

The first-time candidate, in the aftermath of a series of recent terror attacks inspired by radical Islamists, also called for a temporary ban of Muslims entering the United States.

Trump has also used derogatory names for his primary opponents to help him win the GOP race and is now targeting Democratic presidential front-runner Hillary Clinton, whom he calls “Crooked Hillary.”

The first lady on Friday also said some people “act as if name-calling is an acceptable substitute for thoughtful debate, as if anger and intolerance should be our default state rather than the optimism and openness that have always been the engine of our progress."

City College is the flagship school for the City University of New York, and among its graduates are Jonas Salk, the son of Polish immigrants and who discovered the vaccine for polio, and Colin Powell, the son of Jamaican immigrants and who became secretary of state.

Obama said she is reminded of such American stories “every single day” when she wakes up in a house “built by slaves.”

On Wednesday, her husband, President Obama, also entered the 2016 debate in a speech in Indiana, saying the “Republican nominee” has “crazy” ideas, including one to deport the roughly 11 million immigrants now living illegally in the United States.