After the sun sets in Westminster, MPs filed through parliament’s division lobbies and voted down Theresa May’s proposed deal with the European Union. It has become conventional wisdom to imagine that this situation was inevitable – that the contradictions inherent within Brexit caused it to collapse under the strain of its impossible promises. But this calamity was not destiny: it has, in fact, mark one of the gravest failures of statecraft since the creation of the British state in 1707. May’s premiership has been characterised by almost unprecedented errors of diplomacy, negotiating strategy with the EU, governing style and domestic political strategy at home.

In the immediate aftermath of Britain’s vote to leave, there was a profound feeling of shock, sorrow and regret among European leaders. There was a determination to limit the damage to the unification project and a desire to keep Britain close. Before long the mood began to change: European capitals were aghast at the appointment of Boris Johnson as foreign secretary, a role that he was manifestly ill-suited for. He quickly launched a British diplomatic effort to divide and conquer European capitals in the summer of 2016 – seeking to identify and play to narrow national interests – but it failed and only served to further damage trust.

But the real turning point came with May’s now infamous “citizens of nowhere” speech to Conservative Party conference. It marked the starting point of British politicians speaking to domestic audiences in nationalistic rhetoric without understanding the damage they were doing to relationships with their European counterparts. Within a few short months, almost all the goodwill towards the UK had evaporated.

Rather than seeking to rebuild trust, May and her ministers doubled-down on alienating other EU countries. In addition to antagonising other heads of government in public, she proved incapable of building rapport in private. She simply repeated the same hackneyed soundbites, unable to offer the reassurances that Britain would be a reliable partner in the future. After her Florence speech, May toured European capitals with nothing more to say and nothing more to offer. But perhaps the most decisive intervention came not from May but from her chancellor. In January 2017 Philip Hammond threatened aggressive tax cuts and deregulation if Britain were not given what it wanted in the negotiations.

This threat was a costly mistake: Britain’s historic allies in northern Europe suddenly saw the UK as a future threat rather than a partner that they hoped to keep engaged in the arena of European diplomacy. By their actions, the UK government had reframed Brexit from continuing our close relationship on a different basis to a matter of containment of the British threat to the European project. Once it was clear that the objective was divergence, the stringent provisions of the withdrawal agreement became a near-inevitable outcome.

Despite the rhetoric, more astute British politicians recognised that the UK would enter the negotiating period without much leverage. What little leverage we had was rapidly squandered in perhaps the single most destructive decision of the whole process. The UK government agreed that the negotiations would be divided into a negotiation about the withdrawal first, and that the future partnership would only be negotiated once we had left.

Perhaps without realising it, May had signed up to a blank Brexit – we would leave the EU with no certainty about our future relationship with our largest trading partner. This was a catastrophic error that will send the UK into purgatory. If the withdrawal agreement were to pass, at the end of 2021 the UK will face the choice of accepting the EU’s terms for a trade deal, extending the transition at the cost of £22bn for a further two years, or entering the backstop.

Commentators on both sides of the Brexit divide claim that the UK triggered Article 50 without having a plan. This is simple untrue: May’s Lancaster House speech of January 2017 set out the government’s negotiating position clearly. The problem was not that there was no plan. The problem was that it was a bad plan, based on ignorance of economic reality – especially surrounding the complex supply chains that criss-cross the channel – with a heavy dose of arrogance and jingoism. May’s vision was for the hardest Brexit imaginable, setting red lines that would create a distant relationship.

A year later, May and her team were doing everything imaginable to try and unpick Lancaster House: the Chequers proposal – to stay in the single market for goods and in a de facto customs union – was a messy attempt to undo this catastrophic error. But it was too little, too late, and immediately rejected by the EU. By this stage, Brussels had lost patience with the May government – the political declaration on the future partnership offers very little. It’s merely a scrap of paper with no legal force.

Support free-thinking journalism and attend Independent events

The same weaknesses that exposed May in Europe fatally undermined her premiership at home. Her secretive and controlling governing style antagonised her ministers and backbench MPs just as it did her European counterparts. With a small majority, she behaved like a prime minister who was unassailable, contemptuous of all before her. Her rebuke came not from her colleagues but from the public through the 2017 general election, where she watched an enormous poll lead slip away.

Just as May failed to build rapport with her European counterparts, she failed to develop a relationship with the British people, refusing to listen to their concerns about austerity or seek the losers’ consent by negotiating a Brexit deal that worked for the whole country. Despite constant claims of commitment to the union, she showed almost no respect for the devolved governments – nor indeed for the trades union movement or wider civil society.

Astonishingly, May proved as contemptuous of parliament having lost her majority as she was when she had one. There was no attempt to reach out to opposition parties, even though it was predictable that she might need their votes to get her deal through the Commons. Instead, Downing Street has attempted to threaten MPs on all sides, simultaneously warning of no Brexit or no deal. It is rare that any people respond well to threats, especially those that involve self-harm. By all accounts, the Cabinet were not treated much better, kept in the dark about the negotiations.

And so, when May finally pulled a dead rabbit out the hat in November it was little surprise that it was received so poorly. Moreover, almost nothing was done to attempt to persuade anyone of its merits. Shockingly, the withdrawal agreement was published at 8pm on a wet November evening with no explanation of what was in it, what it might achieve, what compromises had been made or why. It later emerged that the business groups who had been briefed in advance had been misled. It was as if May sincerely believes that she alone is the arbiter of the national interest and that it should be self-evident that she is right.

Looking back, it is not hard to imagine a very different path. A more skilled prime minister would have accepted the referendum decision but recognised that the result was close. Brexit could have been defined as a political departure that need not be an economic rupture. Rather than amplifying division, she could have sought to have healed a divided nation. Our relationship with the EU would be on a different basis, she would have said, but we would remain friends and allies. If the objective had been set as alignment and partnership, negotiating capital could have been focused on securing Britain’s voice in European decision-making, while recognising that it would not be able to carry the same weight as full members of the EU.

A less divisive and more strategic prime minister would have invested in building trust across all sides, and negotiated an agreement that reflected the priorities of those who voted for Remain as well as Leave – and voted for other political parties too. Instead, we are confronted by multiple crises – political, economic and social – that could have been avoided.