Trump's comments, made at a closed-door White House meeting, were a reaction to a plan to cut the number of people entering the US through its visa lottery program. According to CNN sources, lawmakers proposed reducing the number by half, with the rest going to underrepresented countries in Africa and nations with Temporary Protected Status (TPS).
UN human rights spokesman Rupert Colville condemned Trump's remarks as "shocking and shameful" and going against the world's "universal values," as he responded to reporters at a news conference in Geneva.
"I'm sorry, but there's no other word one can use but racist," Colville said. "You cannot dismiss entire countries and continents as 'shitholes' whose entire populations, who are not white, are therefore not welcome."
Former Haitian President Laurent Lamothe said the "world is witnessing a new low today" and called Trump's remarks "totally unacceptable!"
"It shows a lack of respect and ignorance never seen before in the recent history of the US by any President," Lamothe tweeted.
As the US ambassador position in Haiti is vacant, the charge d'affaires at the embassy, Robin Diallo, will meet with Haitian President Jovenel Moïse on Friday, a senior State Department official told CNN.
El Salvador's Foreign Minister Hugo Martinez responded to Trump's comments by tweeting about Salvadoran contributions to the United States, saying "a good part of those who helped rebuild New Orleans after Katrina were Salvadoran. I feel proud to be Salvadoran."
Meanwhile, US diplomats and the US Embassy in San Salvador sought to assure those in El Salvador of their respect for the country.
Jean Manes, US envoy to El Salvador, tweeted in Spanish: "I have had the privilege to travel around this beautiful country and meet thousands of Salvadorans. It is an honor to live and work here. We remain 100% committed."
The official account for the US Embassy in San Salvador tweeted in Spanish: "The United States is proud to be a partner of El Salvador and we remain firm in our friendship that dates back various decades."
Nepal, which became a TPS nation after a major earthquake in 2015, said authorities were discussing their response to the matter.
The South Asian country's Foreign Minister Bharat Raj Paudyal told CNN "we are aware of President Trump's comments, and our ministry is discussing the matter."
A senior official from Somalia, also on the US list of TPS nations, told CNN that Trump's comments were unworthy of a response.
"It sounds like fake news to me," said Somali Information Minister Abdirahman Omar Osman, speaking by phone from Mogadishu. "If it's real, it doesn't need a response. Those comments do not deserve a response."
"With what authority do you proclaim who's welcome in America and who's not. America's greatness is built on diversity, or have you forgotten your immigrant background, Donald?" he said.
Trump insulted the continent of Africa in his comments as well, leading to fierce reaction there.
The government of Botswana said it had summoned the US ambassador to the southern African nation to "express its displeasure" over Trump's reported comments, which it views as "highly irresponsibly, reprehensible and racist."
The government said it had also asked the United States to "clarify if Botswana is regarded as a 'shithole' country."
In Kenya, Saum Ramadhan, a 23-year-old engineering student at the University of Nairobi, told CNN she found Trump's comments "very offensive, because I think most countries in Africa are pretty stable and we are doing good.
She added: "There might be some struggles but I think we are doing good. I don't think it's fair to classify all Africa as shitty. That is absolutely wrong."
Duncan Owor, a medical student from Central Kenya, told CNN that Trump's remarks were "not the right thing for him to do" given his status.
"He is the president of the United States of America. We expect more of him. We expect him to be an example. We are growing democracies. We don't expect such remarks," Owor said.
"Africa sends love and light to America," he added.
Kenyan activist Boniface Mwangi tweeted, "Africa isn't a shithole. It's the most beautiful continent in the world. Beautiful, hardworking people. We have diamonds, gold, iron, cobalt, uranium, copper, bauxite, silver, petroleum, cocoa, coffee, tea etc. Sadly we have #shithole leaders like Trump shitting on us everyday."
South Africa's best known morning-news anchor Leanne Manas tweeted, "Good morning from the greatest most beautiful 'shithole country' in the world!!!"