Trump then suggested that the United States should instead bring more people from countries such as Norway, whose prime minister he met with Wednesday. The president, according to a White House official, also suggested he would be open to more immigrants from Asian countries because he felt that they help the United States economically.
In addition, the president singled out Haiti, telling lawmakers that immigrants from that country must be left out of any deal, these people said.
"Why do we need more Haitians?" Trump said, according to people familiar with the meeting. "Take them out."
In November, the Trump administration rescinded deportation protection granted to nearly 60,000 Haitians after the 2010 earthquake and told them to return home by July 2019.
Lawmakers were taken aback by the comments, according to people familiar with their reactions. Sens. Lindsey O. Graham (R-S.C.) and Richard J. Durbin (D-Ill.) had proposed cutting the visa lottery program by 50 percent and then prioritizing countries already in the system, a White House official said.
A White House spokesman defended Trump's position on immigration without directly addressing his remarks. White House officials did not dispute the account.
"Certain Washington politicians choose to fight for foreign countries, but President Trump will always fight for the American people," spokesman Raj Shah said in a statement issued after The Washington Post first reported Trump's remarks. ". . . Like other nations that have merit-based immigration, President Trump is fighting for permanent solutions that make our country stronger by welcoming those who can contribute to our society, grow our economy and assimilate into our great nation."
Trump built his candidacy and presidency around hard stances on immigration, vowing to build a wall along the Mexican border and cut legal immigration by half, among other positions. Officials at the Department of Homeland Security have increased immigration raids, including dozens this week at convenience stores across the country.
Trump's comments Thursday also put further scrutiny on his long-standing tendency to make racially charged remarks — including attacks on protesting black athletes and his claim that there were fine people "on both sides" after neo-Nazis rioted in Charlottesville, Va. Trump falsely claimed for years that Barack Obama was not born in the United States and took out advertisements calling for the death penalty for members of the Central Park Five — four black youths and a Hispanic youth who were accused of a brutal rape in New York and later exonerated.
The president's remarks were quickly met with scorn from Democrats and some Republicans and could throw another wrench into bipartisan discussions on immigration, which had shown promise in recent days, according to legislators.
Rep. Luis Gutiérrez (D-Ill.) said the comments "will shake the confidence that people have" in the ongoing immigration policy talks.
"Democrats and Republicans in the Senate made a proposal. The answer is this racist outburst of the president. How can you take him seriously?" Gutiérrez said. "They [Republicans] don't believe in immigration — it's always been about people of color and keeping them out of this country."
Rep. Cedric L. Richmond (D-La.), chairman of the Congressional Black Caucus, said on Twitter that Trump's remarks "are further proof that his Make America Great Again Agenda is really a Make America White Again agenda."
Some Republicans also raised objections. Rep. Mia Love (R-Utah), whose family is from Haiti, said in a statement that Trump's remarks were "unkind, divisive, elitist, and fly in the face of our nation's values. This behavior is unacceptable from the leader of our nation."
"My grandmother used to say, 'Digame con quién caminas, y te diré quién eres.' 'Tell me who you walk with, and I'll tell you who you are,' " said Rep. Adriano Espaillat (D-N.Y.), who represents most of Harlem and is an immigrant from the Dominican Republic, which shares the island of Hispaniola with Haiti. "If he's walking around with white supremacists and supporting them, this kind of talk doesn't surprise me."
The New York Times also reported last year that Trump said immigrants from Haiti have AIDS. The White House denied that report.
In a statement condemning Thursday's remarks by Trump, Haiti's ambassador to the United States, Paul G. Altidor, said that "the president was either misinformed or miseducated about Haiti and its people." He said the Haitian Embassy was inundated with emails from Americans apologizing for what the president said.
Democrats were quick to note that Trump employs Haitians at his Mar-a-Lago resort in Florida and that he praised Haitian Americans during a roundtable in Miami in September.
"Whether you vote for me or don't vote for me, I really want to be your greatest champion, and I will be your champion," Trump said at the roundtable.
Alix Desulme, a city council member in North Miami, home to thousands of Haitian Americans, said the president's latest remarks were "disgusting."
"Oh, my God. Oh, my God Jesus," Desulme said. "I don't know how much worse it can get."
"This is very alarming. We know he's not presidential, but this is a low," he said. "It's disheartening that someone who is the leader of the free world would use such demeaning language to talk about other folks, referring to folks of color."
Trump's critics also said racially incendiary language could damage relationships with foreign allies.
For many of Trump's supporters, however, the comments may not prove to be particularly damaging. Trump came under fire from conservatives this week for seeming to suggest that he would be open to a comprehensive immigration reform deal without money for a border wall, before he quickly backtracked.
"He's trying to win me back," conservative author Ann Coulter, who has called for harsh limits on immigration, wrote on Twitter.
Outlining a potential bipartisan deal, the lawmakers discussed restoring protections for countries that have been removed from the temporary protected status (TPS) program while committing $1.5 billion for a border wall and making changes to the visa lottery system. Lawmakers mentioned that members of the Congressional Black Caucus had requested that some African countries be included in a deal, according to a White House official, who spoke on the condition of anonymity to describe a private conversation.
The exchange was "salty" on all sides, this person said, with the president growing profane and animated while discussing immigrants from other countries. "It did not go well," this person said.
The administration announced this week that it was removing TPS status for citizens of El Salvador. Haitians were added to the TPS program because of a strong earthquake that devastated Haiti eight years ago.
Trump had seemed amenable to a deal earlier in the day during phone calls with lawmakers, aides said, but shifted his position in the meeting and did not seem interested in the bipartisan compromise.
The scene played out hurriedly in the morning. Graham and Durbin thought they would be meeting with Trump alone and were surprised to find immigration hard-liners such as Rep. Bob Goodlatte (R-Va.) and Sen. Tom Cotton (R-Ark.) at the meeting. White House and Capitol Hill aides say Stephen Miller, the president's top immigration official, was concerned there could be a deal proposed that was too liberal and made sure conservative lawmakers were present.
After the meeting, Marc Short, Trump's director of legislative affairs, said the White House was nowhere near a bipartisan agreement on immigration.
"We still think we can get there," White House press secretary Sarah Huckabee Sanders said at the daily White House news briefing.
Ed O'Keefe, Maria Sacchetti and Erica Werner contributed to this report.