Donald Trump has said some Democrat congresswomen from countries “whose governments are a complete and total catastrophe” should “go back and help fix the totally broken and crime-infested places from which they came”.

While it was not explicitly clear to whom the US president was referring, it came after he launched an extraordinary attack on Alexandria Ocasio-Cortez and Ilhan Omar – both women of colour – saying he “doesn’t even know where they came from”.

He tweeted: “So interesting to see ‘Progressive’ Democrat Congresswomen, who originally came from countries whose governments are a complete and total catastrophe, the worst, most corrupt and inept anywhere in the world (if they even have a functioning government at all), now loudly and viciously telling the people of the United States, the greatest and most powerful Nation on earth, how our government is to be run.

“Why don’t they go back and help fix the totally broken and crime infested places from which they came. Then come back and show us how it is done.

“These places need your help badly, you can’t leave fast enough.

Melania Trump wooden statue prompts complaints in Slovenia Show all 5 1 /5 Melania Trump wooden statue prompts complaints in Slovenia Melania Trump wooden statue prompts complaints in Slovenia A wooden statue of Melania Trump has been erected in the first lady’s home country of Slovenia REUTERS Melania Trump wooden statue prompts complaints in Slovenia The conceptual statue depicts Ms Trump standing in the blue outfit she wore to her husband’s inauguration REUTERS Melania Trump wooden statue prompts complaints in Slovenia The monument is set in the fields near the town of Sevnica REUTERS Melania Trump wooden statue prompts complaints in Slovenia Locals have complained that the wooden sculpture does not look like Ms Trump at all AFP/Getty Images Melania Trump wooden statue prompts complaints in Slovenia The statue was commissioned by US artist Brade Downey and created by artist Ales Zupevc AFP/Getty Images

“I’m sure that Nancy Pelosi would be very happy to quickly work out free travel arrangements!”

Yesterday, Mr Trump had claimed Ms Ocasio-Cortez and Ms Omar were among a group of Democrats being “disrespectful” to Nancy Pelosi, the House speaker.

Ms Pelosi herself condemned the president’s “xenophobic comments meant to divide our nation”.

She tweeted in return that Mr Trump was reaffirming that his plan to “Make America great again” had “always been about making America white again”. She added: “Our diversity is our strength and our unity is our power.”

Other commenters also quickly condemned Mr Trump, some accusing him of “early Hitler”-style talk.

One replied: “These women are American citizens. They are doing the most patriotic thing available to them: questioning and critiquing their government.

“Patriotism is much more than just saluting a flag or singing an anthem.”

Another told the president: “Three of the four were born here, so you may be right about fixing the place where they were born. The fourth is a citizen. All were elected by a majority. You fail on all counts.”

Many pointed out his wife, Melania, was not born in America.

Ms Pelosi also used the row to attack the immigration raids across US cities this weekend, posting: “Rather than attack Members of Congress, he should work with us for humane immigration policy that reflects American values. Stop the raids.”

Last week, the speaker had told colleagues she was frustrated with people using social media to criticise other members of the party. The comments were interpreted as being directed at Ms Ocasio-Cortez, Ms Omar, and two other Democrat women, all of whom have large social media followings among progressives and have been outspoken.

The president said: “I deal with Nancy Pelosi a lot and we go back and forth and it’s fine, but I think that a group of people is being very disrespectful to her. And you know what, I don’t think that Nancy can let that go on.”

His history of racist comments includes sharing a tweet attacking Sadiq Khan, the London mayor, following three killings in the city.

“London needs a new mayor,” Mr Trump wrote. “Khan is a disaster – will only get worse!”