Rupert Colville, a spokesperson for the United Nation High Commissioner for Human Rights, condemned Trump's characterisation of the two countries as "s**tholes" during a meeting on Thursday with lawmakers on a bipartisan immigration deal, Efe news agency reported.
"These comments by the President of the US are surprising and shameful," Colville said. "I'm sorry, but they cannot be defined as anything other than racist."
According to people present in the Oval Office meeting, Trump was frustrated that migrants from El Salvador, Haiti and certain African countries were allowed into the US.
"Why are we having all these people from s**thole countries come here," he asked.
"Why do we need more Haitians," Trump said, adding: "Take them out."