Washington: President Donald Trump reportedly lashed out in a Thursday meeting with lawmakers about immigration reform, demanding to know why the US should accept citizens from what he called "shithole" countries.

Trump sat down with senators and congressmen at the White House to discuss a proposed bipartisan deal that would limit immigrants from bringing family members into the country and restrict the green card visa lottery in exchange for shielding hundreds of thousands of young immigrants from deportation.

"Why are we having all these people from shithole countries come here?" Trump said, according to people briefed on the meeting who spoke with The Washington Post.

The New York Times later reported the same comment, citing unnamed people with direct knowledge of the meeting.

The president was referring to African countries and Haiti, and then suggested the United States should welcome immigrants from places like Norway, whose prime minister met with Trump on Wednesday.

The comments alarmed and mystified the people attending the meeting.

Republican Senator Lindsey Graham and Democratic Senator Dick Durbin came to the White House to outline their bipartisan compromise, but found themselves in the room with several Republican immigration hardliners.

Graham and Durbin are leading efforts to codify protections for so-called "dreamers," immigrants who came to the United States illegally as children.

In exchange, the deal would end extended family chain migration.

It also reportedly would cut the visa lottery program by half and prioritize certain countries in the system, instead of scrapping it altogether as several Republicans have suggested as part of an agreement.

The president and lawmakers are in the midst of intense negotiations about how to shield nearly 800,000 "dreamers" from deportation.

Last year, Trump scrapped the Obama-era Deferred Action for Childhood Arrivals (DACA) program that protected the immigrants, and set a deadline of March 5 for Congress to legislate a fix.

The White House did not deny the account of Trump's use of language, but instead suggested the president was "fighting for permanent solutions" that strengthen the nation, in part through the use of a merit-based immigration system.

"Certain Washington politicians choose to fight for foreign countries, but President Trump will always fight for the American people," White House spokesman Raj Shah said in a statement.

"He will always reject temporary, weak and dangerous stopgap measures that threaten the lives of hardworking Americans, and undercut immigrants who seek a better life in the United States through a legal pathway."

Some Democrats seized on Trump's slur to suggest he is anti-immigrant.

"We always knew that President Trump doesn't like people from certain countries or people or certain colors," congressman Luis Gutierrez said.

"We can now we say with 100% confidence that the president is a racist who does not share the values enshrined in our Constitution."