President Barack Obama blasted Republicans running in the 2016 presidential race for using anti-immigrant rhetoric, which he said is "un-American."

The president criticized the GOP contenders vying for the White House on Monday during a town hall held at a high school in Des Moines, Iowa. Although Obama did not name anyone in particular, GOP front-runner Donald Trump has been the most vocal about his disdain for undocumented residents. He even called Mexican immigrants drug traffickers and rapists during his presidential election announcement speech in June. He has also suggested that the U.S. should stop illegal immigration by building a wall on the southern border and deporting the nearly 12 million undocumented people who are currently living in the country.

In turn, many other Republican candidates on the campaign trial have also taken harsh swipes at immigrants.

In response, Obama scolded GOP candidates who he said are injecting "anti-immigrant sentiment" in the political discourse.

"This whole anti-immigrant sentiment that's out there in our politics right now is contrary to who we are," Obama said, according to NDTV. "Because unless you are a Native American, your family came from someplace else."

He went on to say, "We can have a legitimate debate about how to set up an immigration system that is fair and orderly and lawful, but, when I hear folks talking as if somehow these kids are different from my kids, or less worthy in the eyes of God, that somehow they are less worthy of our respect and consideration and care -- I think that's un-American. I do not believe that. I think it is wrong."

Obama also hinted that it won't be long before he endorses one of the presidential candidates in the race.

"I can't tell you who to vote for, at least just not right now," he said, reports CNN. "Later I will."