US
Bans, which were issued in April and June, were set to expire on Dec. 31, but will be extended until March 31, 2021
Trump has also threatened to rip up a key trade deal between the United States and Mexico
Trump campaigned for a crack down on what he characterised as a source of widespread crime and a drag on the economy
The replacement order could be issued as early as Tuesday
The move could come as part of the effort to toughen vetting of visitors
Dozens of technology giants have filed a joint legal brief arguing against the temporary ban on refugees
Technology companies expected to sign the letter include Apple, Facebook, Google, Twitter and Microsoft
The overnight ruling dealt a further setback to Trump
Trump's election has laid bare the deep divisions of American society
President Trump's crackdown on immigration will include restrictions on so-called H-1B visas