The issuing of Donald Trump’s executive order banning travel to the US from seven predominantly Muslim countries led to accusations and recriminations inside the new administration, with tales of tense stand-offs and acrimonious conference calls in the middle of the night. In the centre of it all was Steve Bannon, the White House’s chief strategist, and the man being described as the "shadow president".

The conference call was about how senior members of the new administration – officials representing Secretary of State nominee Rex Tillerson, Defence Secretary James Mattis and White House lawyers – have been excluded from deciding on key points in the drafting of the executive order, which had been largely put together by Bannon and his sidekick Stephen Miller. It has also emerged that Bannon asked the head of Homeland Security, John Kelly, to withhold issuing a waiver for Green Card holders and permanent residents from the seven countries. The former Marine general refused to do so unless he received a direct order from Trump himself: no such order came.

Trump’s executive order has now been blocked by the appeal court, upholding a district court decision. Among other things, the issue of permanent residents, whose rights Bannon had sought to undermine, came up in the ruling. It acknowledged that White House counsel Donald F McGahn II (one of those who had taken part in the 2am conference call) had said, several days after the executive order came out, that it did not apply to permanent residents. But, said the judges, “we cannot rely on that”, partly because of “the government’s shifting interpretations” of the order.

Trump reacts to travel ban ruling

The appeal court also rejected claims by White House lawyers that judges had no power to review a president’s assessment of national security, stressing that the courts have a fundamental role in protecting the US constitution.

There was the usual furious tweet from Trump – “See you in court!” – but the Supreme Court is now divided four and four between Republican and Democrat appointees. A tie reflecting that will leave the appeal court ruling in place unless the White House waits until the time when, and if, Trump’s choice for the bench, Neil Gorsuch, gets in place.

All this could have been avoided, administration officials point out, had there been more caution over the travel ban and if its pitfalls had been examined. But the rushing through is said to be very much in the blitzkrieg approach of Bannon, who exhorts that it is vital to make full use the momentum of Trump’s landmark victory and before the loathed "establishment" can organise itself to sabotage the revolution.

New York City bodegas strike to protest Trump's travel ban Show all 27 1 /27 New York City bodegas strike to protest Trump's travel ban New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Ethnic Yemenis and supporters protest against President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban Men pray during a protest by ethnic Yemenis and supporters over President Donald Trump's executive order temporarily banning immigrants and refugees from seven Muslim-majority countries, including Yemen on February 2, 2017 in the Brooklyn borough of New York City. At least 1,000 Yemeni-owned bodegas and grocery-stores across the city shut down from noon to 8 p.m. today to protest the order. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People gather for evening prayer at a rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally with flags at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest US President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban People rally at Brooklyn Borough Hall as Yemeni bodega and grocery-stores shut down to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen, on February 2, 2017 in New York. Bryan R. Smith/AFP/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner places a sign on the gate of his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban NEW YORK, NY - FEBRUARY 02: Yemeni business owner Musa closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty New York City bodegas strike to protest Trump's travel ban A Yemeni business owner closes the gate to his store February 2, 2017 in the Brooklyn borough of New York City. Across the city, Yemeni owned bodega and grocery-stores will shut down from noon to 8 p.m. to protest President Donald Trump's Executive Order banning immigrants and refugees from seven Muslim-majority countries, including Yemen. It is expected that over 1000 stores will be closed in protest with workers and owners participating in an afternoon rally in Brooklyn. Spencer Platt/Getty

“I am a Leninist,” Bannon has declared. “Lenin wanted to destroy the state, and that’s my goal too. I want to bring everything crashing down, and destroy all of today’s establishment.” Lenin had indeed held that once the revolution has started it would “acquire an unstoppable momentum of its own and scatter its sparks over the great mass of combustible material”. Switching metaphors, he continued that “It was impossible to come out of the war without starting an avalanche”. Bannon also likes to talk of war – “we are in an outright war against jihadist Islamic fascism” and “the war to save American jobs” and “we are going to war in the South China Sea in the next five to 10 years”.

But, while waiting for Gotterdammerung, Trump is humiliated in his first major policy initiative; just a month into the presidency his popularity continues to plummet, and his administration is being viewed as chronically chaotic. And what will happen if the mini-avalanche Bannon has set in motion fails to deliver the promises Trump has made? If he cannot bring back jobs to the rust belt and the coal towns? If the replacement for Obamacare fails to be satisfactory? If he fails to destroy Islamic terrorism? Or if his protectionist policies hurt business and industry? Technology firms have already taken part in legal action against the travel ban and they are now gearing up for another confrontation, over the visa system under which they can harvest international recruits for Silicon Valley.

The Trump administration is said to have already drawn up another executive order under which the firms would be forced to hire Americans instead and visas would only be given to the most senior workers from abroad. This is an issue close to the heart of Bannon, who has said there are too many Asian CEOs in Silicon Valley and international students in American universities should go back to where they came from. The technology companies say the order makes no commercial sense and would be highly damaging for them, the tech sector and the US economy.