Theresa May was probably feeling pretty buoyant when she got on the plane from Turkey to London. She'd managed to secure her alliance with the new US president and kept alive her hopes of a politically-convenient US trade deal, while simultaneously issuing sufficient warnings to protect her from critics of Donald Trump back home. When she got on the plane, her trip appeared a success.

By the time it touched down in London late on Saturday evening, things had changed. Trump's order of a Muslim ban at US airports was causing escalating panic and outrage. Suddenly it seemed to apply not just to the citizens of the seven countries he'd picked, but also dual passport holders and possibly even anyone born in those countries, regardless of passport. That, of course, included British citizens.

Suddenly May's repeated 'US foreign policy is for the US' mantra looked cowardly and slow-witted. Her team went into panic mode, issuing a slightly tougher statement around midnight on Saturday night. You should treat Downing Street statements like phone calls: if they come in the dead of night, it means something is wrong.

The early part of the week was a test study in how May's team responds to a political crisis. It is their first big crisis. Given how complex and treacherous the negotiations in Brussels will be, it will not be the last, so this was a useful instruction in how they would perform.

First they said they would check to see if the ban affected Brits. Then they returned to say it didn't. Then official advice said it probably did. Then they said again it didn't. Then they blamed the invitation for a Trump state visit on the state visit committee, which may or may not exist. Then it turned out that might mean the royal visit committee, which does exist but wasn't responsible. Then they confirmed that actually the invitation had come from Downing Street. And that was just Monday. They were a shambles, protected from political bloodletting only by the even-greater shambles that is the official opposition.

On Wednesday, Jeremy Corbyn asked May about the Trump visit during PMQs. Had Trump told her he was planning this when she was speaking to him hours beforehand? What did she know and when? It seemed like for once we’d get some decent forensic questioning from the Labour leader. May had clearly prepped for it. The answer was no, he hadn't mentioned it.

Corbyn is congenitally unable to think on his feet, so the debate got away from him and May delivered a thumping. But her answer was remarkable. Just a week before, again at PMQs, she had been telling him that she could speak frankly with the US because she made sure the special relationship worked. Now here she was admitting the new president had not even bothered to tell her he was about to pass an order banning thousands of Brits from the US within hours of their meeting. Or, if the British exemption had always been planned, that it existed. For all May's fawning, Trump clearly did not respect her enough to inform her of this not-insignificant policy. And in exchange? In exchange she'd offered him the highest honour she had in her power to impart.

On every level, she had made her own life harder. And then, when the disaster struck, she proved unable to deal with it. She was so cowardly she failed to condemn the ban on its own terms, so slow-witted she couldn't see how it might affect British citizens, so eager for a trade deal she created a clear channel for British anti-Trump outrage to be directed at her, and so inept at media management that the row turned her trip into a disaster.

Then, days later, the Commons voted on the second reading of the Article 50 bill, itself a result of her being forced into consulting parliament following a defeat in the high and supreme court. On Thursday, as a result of yet another U-turn (she averages several a week) the government published a white paper on Brexit. White was the correct word for it, although blank would also do.

It contained precious few ideas for how she would fulfill all her promises: ending free movement while keeping all the good bits of the customs union and single market membership, ending European Court of Justice jurisdiction while keeping the privileges of the system it orders, and eradicating any EU payments despite European claims that that will scupper any talks before they've even started.

That is what the next two years entail. It is a task so daunting Churchill himself would have struggled to achieve it. Given her performance over the last week, we should prepare for disaster.

Ian Dunt is the editor of His book – Brexit: What The Hell Happens Now? – is out now from Canbury Press.

The opinions in's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners.