New York City’s mayor has condemned Donald Trump’s ban on citizens from certain Muslim dominated countries calling it “simply un-American”.

Bill de Blasio, who has been an outspoken critic of the new president, said the executive order which introduced ban on all immigration from seven Middle Eastern countries – including those with green cards, visas and dual citizenship of other countries – “sent out a horrible message” to people around the world

In the early hours of the morning a New York judge, Ann Donnelly, ruled the bans on refugees and people from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen was unconstitutional and temporarily halted the order – allowing people who already had visas into the US.

Mr de Blasio then tweeted that the temporary stay was just the “beginning” of people’s fight against the order.

The order has meant several people were detained at JFK in New York and other airports around the country for hours at a time.

The detentions attracted mass protests with demonstrators flooding into JFK’s Terminal 4 demanding the release of two Iraqis who had come to the US on valid visas.