Tech firms Amazon and Expedia are backing a legal challenge to President Donald Trump's executive order banning immigration from several majority-Muslim countries.

Attorney general Bob Ferguson announced that the US state of Washington will challenge the order, which bars citizens of Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen from entering the US for 90 days, in federal court.

He said that Amazon and Expedia, which are based in Washington, are supporting the lawsuit.

Democratic governor Jay Inslee said the Trump administration should face lawsuits from the state itself as well as individuals affected by the order.

"It is an insult and a danger to all of the people of the state of Washington, of all faiths," Inslee said.

The British Government has said only travellers flying directly from those seven countries to the US were affected by the order.

However myriad reports claimed travellers with passports from the affected countries were barred from boarding US-bound flights in cities including Cairo, Egypt and Doha, Qatar, and that people who were travelling when the order took effect were detained at US airports regardless of their point of departure.

Even holders of US green cards, which confer permanent US resident status, had to apply for national interest waivers initially before the White House decided they were exempt.

In recent days thousands have protested at a number of US airports while Silicon Valley companies have been lining up to criticise the order.

Google CEO Sundar Pichai sent a memo to the firm’s employees on Friday which revealed that more than 100 Google staff were directly affected, while Google co-founder Sergey Brin joined protesters at San Francisco Airport on Saturday.

AirBnB co-founder Brian Chesky offered free housing to anyone unable to return to the US because of the order.

Apple, Google and Microsoft have offered legal aid to staff affected by the order while Uber is creating a $3 million (£2.3m) fund to help drivers with immigration problems.

Its rival ridesharing start-up Lyft will donate $1 million over the next four years to the American Civil Liberties Union, which is fighting the order. Slack and Union Square Ventures said they would match that donation.

Uber chief Travis Kalanick, who called the ban “wrong and unjust”, said he would raise the tech sector’s concerns at Trump’s business advisory council, a sentiment echoed by Tesla chief executive Elon Musk.

Facebook founder Mark Zuckerberg, Netflix CEO Reed Hastings, Twitter co-founder and chief executive Jack Dorsey and Apple chief executive Tim Cook have all also criticised Trump.

Below: Donald Trump quiz from the election trail