U.S. presidential candidate Donald Trump held the first town hall meeting of his campaign on Wednesday in Derry, N.H.

The Republican frontrunner said that he has good relationships with Mexicans and that he would welcome migrants that entered the country legally. But he said illegal immigrants are causing problems and that if they continue to enter the U.S. "we have no country."

"If I win," Trump told the town hall, "Day 1 of my presidency, they're getting out and getting out fast."

Trump's comments came after the Mexican government criticized his policy proposals on immigration, border security and U.S.-Mexico relations, saying they are tainted with bigotry.

'It's gonna be a real wall'

Trump also reaffirmed his intention to build a wall at the U.S.-Mexico border.

"It's gonna be a real wall," he said. "Not a toy wall like we have now."

He also said he doesn't think he's "mean-spirited" toward immigrants. 

"We've got bad dudes out there," he said.

This week, Trump outlined proposals to deny citizenship to U.S.-born babies of immigrants living in the United States illegally as part of a plan emphasizing border security and millions of deportations.

Mexico's Foreign Relations Department has said Trump's stances "reflect prejudice, racism or plain ignorance."

The department said Wednesday that such proposals "are not only prejudiced and absurd," but would be harmful for both countries.

It said Mexican migrants make significant contributions to the U.S. economy and net migration from the country to the United States reached zero in recent years.

With files from The Associated Press