Media playback is unsupported on your device Media caption Protests are taking place across the US against Mr Trump's executive order

The Trump administration is standing firm over its ban on immigration from seven countries despite court rulings and mass protests against it.

In a statement, President Trump said visas would once again be issued once "the most secure policies" were in place, and denied it was a Muslim ban.

The move has been widely condemned.

Sixteen state attorneys general have said the order is unconstitutional. Several federal judges have temporarily halted the deportation of visa holders.

Mr Trump's executive order, signed on Friday, halted the entire US refugee programme for 120 days, indefinitely banned Syrian refugees and suspended all nationals from seven Muslim-majority countries.

Those who were already mid-flight were detained on arrival - even if they held valid US visas or other immigration permits. It is not known how many others were turned away at airports overseas as they tried to board flights to the US.

Thousands gathered at airports around the country to protest on Saturday, including lawyers who offered their services for free to those affected.

Further demonstrations were held on Sunday, including protests outside the White House and Trump Tower in New York.

Media playback is unsupported on your device Media caption US-Syrian clarinetist Kinan Azmeh - touring in Beirut - is worried he may not be allowed back

Who is affected by the ban?

As well as the ban on all refugees, travellers who have nationality or dual nationality of Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen are not permitted to enter the US for 90 days, or be issued an immigrant or non-immigrant visa.

This includes those who share dual nationality with allied countries, including the UK, although Canada has been told its dual nationals are not affected.

But there remains much confusion.

The UK Foreign Office put out a statement saying that only those dual nationals travelling from one of the blacklisted seven countries would be subject to extra checks - those travelling between the UK and US would not be affected.

However, one Scottish veterinary student - who travels on an Iranian passport - was unable to fly home from her holiday in Costa Rica because she was told her transit visa for the US was no longer valid.

White House Chief of Staff Reince Priebus said US Green Card holders - legal residents - would also not be affected, but some have been detained since the order came into effect.

What does the White House say?

Mr Trump tweeted early on Sunday that the US needed "extreme vetting, NOW" but later, in a statement, tried to offer more reassuring words, saying: "This is not about religion - this is about terror and keeping our country safe.

"We will again be issuing visas to all countries once we are sure we have reviewed and implemented the most secure policies over the next 90 days," he said.

Media playback is unsupported on your device Media caption Donald Trump supporters give their views on the ban from New York's Staten Island

In a tweet on Monday morning, Mr Trump placed the blame for any perceived chaos at the airports on protesters, "the tears of Senator [Chuck] Schumer" and Delta Airlines, which had a computer issue on Sunday which led to the cancellation of 170 flights, and another 110 on Monday.

Delta has more than 5,400 flights a day.

Mr Trump also said "only 109 people out of 325,000" travelling, had been detained for extra questioning - a figure Mr Priebus had given to the media on Sunday.

But the statements have failed to allay concern among some in the Republican party. The Republican chair of the US Senate Foreign Relations committee, Senator Bob Corker, said the executive order had been "poorly implemented", particularly for Green Card holders, and the "administration should make appropriate revisions".

Democratic Senate Minority leader Chuck Schumer said the US now appeared "less humanitarian, less safe, less American" and said the Democrats would introduce legislation to overturn it.

Fear, uncertainty and small acts of rebellion at Dulles airport - BBC's Jessica Lussenhop in Washington DC

Image caption Lawyers gathered to represent those facing travel bans

Ali worked for three years as an interpreter for the US Army and gained admittance to the US through a Special Immigrant Visa. He now has a green card, and returned to Iraq for his father's funeral, only to be delayed for hours for questioning at Dulles.

"We are not terrorists. We are not bad people," said Ali. "It's so hard. I hope they will change their minds on this position."

Read more here

Legal minds have their say

In a joint statement, 16 attorneys general, from states including California, New York and Pennsylvania, said they would "use all of the tools of our offices to fight this unconstitutional order" and, until it was struck down, would "work to ensure that as few people as possible suffer from the chaotic situation that it has created".

Late on Saturday, federal Judge Ann Donnelly, in New York, ruled against the removal from the US of people with approved refugee applications, valid visas and "other individuals... legally authorised to enter the United States".

She was ruling on a case brought on behalf of two Iraqi men with links to the US military who were detained at JFK Airport in New York, who were later released.

Elsewhere in the US:

In Boston, a judge decided two Iranian nationals, both university professors, should be released from detention at Logan International Airport

An order issued in Virginia banned, for seven days, the deportation of Green Card holders held at Dulles Airport and ordered the authorities to allow access to lawyers

A Seattle judge issued an emergency stay of removal from the US for two people

The Department of Homeland Security has said it will continue to enforce the measures.

Amateur hour at the White House? - Analysis by Anthony Zurcher, BBC News, Washington DC

History will judge the long-term impact of Mr Trump's Friday afternoon immigration order, but his early praise for its implementation will not easily be forgotten.

"It's working out very nicely," he said in a brief response to a question on Saturday afternoon. On the ground at major US airports, things weren't going quite so nicely, however.

Read more on this from Anthony

Countries react with alarm

Criticism of Mr Trump's decision has been growing louder outside the US.

Canada is offering temporary residence to those stranded there because of the US order, the immigration minister said. Prime Minister Justin Trudeau earlier tweeted that Canada welcomed "those fleeing persecution, terror and war".

Iran is threatening a reciprocal ban on US citizens entering the country. Similar comments came out of Iraq, with whom the US is working to drive IS out of Mosul.

Chancellor Angela Merkel of Germany said "even the necessary, determined fight against terrorism does not justify placing people of a certain origin or belief under general suspicion".

A spokesperson for UK PM Theresa May said she "did not agree" with the restrictions, and French independent presidential candidate Emmanuel Macron tweeted: "I stand with the people fleeing war and persecution."

Meanwhile, Australian PM Malcolm Turnbull has thanked President Trump after he confirmed that the US would uphold its agreement to accept vulnerable asylum seekers held in Australia's offshore detention centres in Papua New Guinea and Nauru.