How will Theresa May be remembered? She laughed like a penguin, danced like a robot and dressed like Cruella de Vil after a midlife divorce. She had the political instincts of a problem gambler, with every loss prompting a more desperate roll of the dice. She had no vision. She appointed bullies as her closest advisers. She lost her voice, metaphorically then literally. And she was felled by a slogan she coined herself: no deal is better than a bad deal.

From the start of her premiership, almost everyone got Theresa May wrong – not least Theresa May. Has there ever been a prime minister whose behaviour was so at odds with their public image? May sold herself as the “vicar’s daughter”, a dutiful workhorse who shouldered a burden no one else wanted. But that was never true. She was not dragged from her ploughshare to become Tory leader. She wanted it, even if hiring Chris Grayling to be her campaign manager suggests a subconscious desire to self-sabotage.

Just as Gordon Brown presented himself as a contrast to the actorly ease of Tony Blair, May was supposed to be our antidote to the glib smoothness of Cameron. His recklessness was easy to identify: it was the casual bluff of a man who has never lost at life. Hers was harder to detect. It was smothered in layers of banality and awkwardness. We know what gamblers are supposed to look like. And so we mistook her lack of charisma for seriousness. We mistook her dullness for caution. Yet this was a woman who triggered Article 50 without a considered strategy and threw away her majority in a needless election when there were three years of a parliament left to run.

Her first speech outside Downing Street in 2016 gestured expansively towards addressing the inequalities in British society, whether of race, sex or class. “If you’re black, you’re treated more harshly by the criminal justice system than if you’re white,” she noted. “If you’re a woman, you will earn less than a man… If you’re from an ordinary working-class family, life is much harder than many people in Westminster realise.”

David Cameron’s over-arching political idea was “austerity”, the self-defeating tendency to cut public spending at a time of sluggish growth and low interest rates. It was woven through virtually every speech and policy announcement he made, and every budget delivered by George Osborne (including, disastrously, the one preceding the EU referendum; no pre-election-style giveaways there). Britain needed to tighten its belt. It would hurt – but it was worth it.

But at the very start of her speech, May junked all that. “David’s true legacy,” she declared, “is not about the economy but about social justice.” His was the government that delivered same-sex marriage, after all. The sharp change in direction was also the culmination of May’s own political journey towards social liberalism. Always a feminist – her maiden speech in 1997 joked about being mistaken for Edwina Currie in the male-dominated Commons – she had come late to gay rights. She voted against repealing Section 28, which banned the “promotion” of homosexuality in schools, and against same-sex adoption. But after 2010 she became one of the most consistent supporters of gay marriage in the cabinet.

She would have loved to deliver something as transformative as that. But May’s social justice legacy is pitiful. Under her there was the first conviction for FGM and she talked about the importance of cervical smear tests in the Commons. But the highest-profile success in equalities legislation – the gender pay audits, which saw John Humphrys and other male BBC stars take a salary cut – was a legacy of Labour’s Harriet Harman. Whatever May’s other ambitions were, they were never going to be fulfilled. They were devoured by Brexit. By the time she left office, parliament was regularly rising early, with no business to discuss or whipped votes to be taken.

That Downing Street speech is remarkable for other reasons. “The full title of my party is the Conservative and Unionist Party, and that word ‘unionist’ is very important to me,” May also declared. Yet she leaves a United Kingdom that looks more fragile than ever. Nicola Sturgeon has promised a second referendum before 2021. Plaid Cymru has surged in Wales, beating Labour in the European elections there. And Northern Ireland still lacks a functioning executive, more than two years after power-sharing collapsed. May’s own actions – that £1bn bung to the DUP to support her government – meant that Westminster lost any hope of being seen as an honest broker. And now candidates for the Tory leadership talk openly about unilaterally withdrawing from the “backstop” designed to prevent a hard border in Ireland.

****

The question history will ask of May is this: was she a victim or a villain? Could anyone have done better, given her opening hand and the pressures she faced? As she gulped down the final words of her resignation speech, it was tempting to feel sorry for her. A good woman in a bad situation. A masochist in a party full of sadists. An ordinary politician in extraordinary times.

Yes, Theresa May has admirable qualities. She fought to get more women selected as parliamentary candidates in a party that then despised what Margaret Thatcher called “strident females”. She genuinely cared about FGM, forced marriage and stop-and-search. Twice, she stood up to her own side: first, in calling the Tories the “nasty party”; then by telling a roomful of stunned police chiefs that the service had to be reformed. No one disputes her work ethic. I always loved her dress sense: that mad grey spaceman coat, the bike-chain necklace, the kitten heels. It suggested there was a more interesting Theresa May inside there somewhere, waiting to get out. There wasn’t.

Three years is too short a time to call an “era”, but the age of May had two distinct phases. The first began with her leadership campaign and lasted until June 2017. It was marked by the loud checks of her “lucky” Vivienne Westwood trouser suit, as she projected that aura of flirtatious steeliness that so excites male Tory MPs of a certain age. This was the Iron Lady 2.0. She would go to Brussels and handbag them, just like Margaret Thatcher did. Never mind that Thatcher was a member of the club, while May was seeking to leave it. Never mind that the other European leaders were fearful of further exits and so wanted to make this one as painful as possible. Never mind that Thatcher in her pomp was in control of her party, while May’s grip on its wilder fringes was only ever tenuous.

In her Iron Lady incarnation, she foreshadowed her own downfall. Buoyed by her poll numbers, she indulged two great lies. First, that Brexit would be easy. Second, that any continued opposition to it was illegitimate now that the people had spoken. She fed the worst instincts of the populist right. They liked her initially – after suffering through David Cameron, with his interest in gay marriage and A-lists of diverse candidates – May felt like a return to real conservatism, blue in tooth and claw. And then she collided with reality. She brought home a Brexit deal that saw Britain leave the single market and customs union – everything that Vote Leave had ever wanted in 2016. But suddenly, that was not enough.

The 2017 election exposed all May’s known flaws – and some new ones, for good measure. She avoided television debates, believing that this made her appear magisterial. In reality, she looked frit. She tried to fight the election as the only one who would deliver Brexit, even though Labour had just voted in favour of triggering Article 50 and included ending freedom of movement in its manifesto. If was as if she hadn’t noticed that Labour was now led by a natural Eurosceptic, Jeremy Corbyn.

There had been frequent grumbles in SW1 that her closest advisers were overmighty, and those complaints were validated when the manifesto appeared with a landmine of a policy buried within it. Those who needed social care would be expected to contribute towards it. It was a fine idea – but someone might have asked Labour’s former health secretary Andy Burnham how easy it was to attack. After all, George Osborne had effectively sunk a similar plan in 2010 by calling it a “death tax”.

This time it was a “dementia tax”. It was wonkish spitballing mysteriously transported into the heat of an election campaign. “Nothing has changed from the principles on social care policy that we set out in our manifesto,” the Prime Minister said on 22 May, while changing the policy to include a £100,000 cap. It was too late. Tory voters had got the impression that the government might take away their houses if they got ill. Those three words – “nothing has changed” – would haunt her premiership. Whatever else changed, Theresa May could not.

Then: defeat. The Conservatives lost Kensington – Kensington! – and May scraped back into Downing Street with the support of the DUP. For a more flexible leader, this would have been the time to change course. But May ploughed on with her plan to get Brexit through purely on Conservative votes, even though those Conservative votes no longer added up to a majority.

From that moment, she could do nothing right. In August that year, Big Ben fell silent. Two months later, so did she – creaking through a party conference speech with her voice ebbing away. No verbal description can do justice to the spectacle of watching that speech in real time. With golden-syrup slowness, disaster followed disaster, exposing May’s fatal inability to think on her feet.

First, she was handed a fake P45 by a self-described comedian. With her voice failing, she gulped water in panicked mouthfuls, each sentence agonising to watch and apparently more agonising to deliver, until she was rescued by Philip Hammond with a cough sweet. We relaxed, fractionally. Then the letters on the backdrop – “building a country that works for everyone” – started to fall off, presumably from sheer embarrassment. Never mind a country, the Conservative Party couldn’t reliably build a sign. What hope for Brexit?

****

May’s fate after the 2017 election now feels like a mirror of the Labour Party’s trajectory after the previous one in 2015. She had called for a negotiated Brexit. Ed Miliband had called for an accommodation with capitalism and austerity. But if a leader preaches a sensible, pragmatic, watered-down version of the doctrine and still fails, then why not have the cask-strength option?

“Brexit means Brexit,” said Theresa May. Yet on her watch, the meaning of Brexit changed beyond recognition. “No deal” was barely mentioned during the referendum in 2016; it was halfway through the campaign before Michael Gove even explicitly called for Leave to mean pulling out of the single market. Yet on 24 May this year, Boris Johnson told a conference in Switzerland: “We will leave the EU on 31 October, deal or no deal. The way to get a good deal is to prepare for a no deal.”

Irresponsible, yes, but only following May’s line that “no deal is a better than a bad deal”. Legitimising that falsehood with all the authority of high office was unforgivable. It created political space for Nigel Farage, whose Brexit Party won 31.6 per cent at the European elections with no manifesto except leaving the EU by whatever means necessary. Farage will never be mugged by reality; he has never even had the sense-check of holding surgeries as a MP. He can traffic in ludicrous simplicities. The centre right ought to stop him, not reveal their yearning to join him on Unicorn Island.

The trouble is that no deal sounds like a clean break: the departing husband moving not to the spare room but straight to a new flat. In reality, it would be extremely messy. British food exporters would face tariffs of 14 per cent, according to the Centre for European Reform (CER). Car imports would face a 10 per cent tariff, and supply chains would be massively disrupted. Many British products would no longer be accredited to sell across the EU. British airlines could no longer be able to fly to, or within, Europe.

The pound would likely fall and inflation would rise. “The result would be a deep recession, which would hit tax revenues and weaken the government’s ability to impart a fiscal stimulus to support the economy,” write John Springford and Simon Tilford of the CER. In this context, Dominic Raab’s leadership campaign pledge to cut basic income tax to 15p begins to look like a sick joke.

It is possible, in theory, that these risks could be anticipated and defused. But what about the conduct of the negotiations so far should give us confidence that all this can be tackled by October? It is to May’s great credit that she never seriously considered leaving without a deal. It is to her great discredit that she nonetheless mouthed that slogan to keep her restless party in check.

Over and over again, Theresa May pretended to offer compromise while fuelling populism. She treated Brexit as a culture war, attacking “citizen[s] of nowhere” in her 2016 conference speech. “Listen to the way a lot of politicians and commentators talk about the public,” she said. “They find your patriotism distasteful, your concerns about immigration parochial, your views about crime illiberal, and… the fact that 17 million voters decided to leave the European Union simply bewildering.”

She returned to the theme in a spectacularly ill-judged speech in March, in the dying days of her leadership. Trying to get her rejected withdrawal agreement through the House, she addressed the country: “You want this stage of the Brexit process to be over and done with. I agree. I am on your side,” she said. “Parliament has done everything possible to avoid making a choice.”

There was one problem: the country didn’t have a vote on her deal. MPs did. Many crucial waverers were disgusted with her rabble-rousing. They felt it was dangerous for a leader to project herself as the people’s tribune, thwarted by the mere machinations of representative democracy, a few short years after one of their colleagues was stabbed by a man who gave his name in court as “Death to traitors”.

When May said “I am on your side”, the implication was that MPs were not. And whose side, anyway? Nearly half the country had voted against Brexit in 2016. Those people were back to being citizens of nowhere with no right to a further opinion. It was wildly misguided, playing to the worst instincts of a divided and angry nation. And it didn’t even work. She still couldn’t pass her withdrawal agreement.

“As we leave the European Union, we will forge a bold, new, positive role for ourselves in the world,” May said in that first speech of 2016. “That will be the mission of the government I lead, and together we will build a better Britain.” In truth, May built nothing. She took a country where both Leavers and Remainers backed a negotiated exit from the EU and turned it into one where three of her potential successors – Johnson, Raab and Esther McVey – downplay the risks of no deal.

Her final speech was borderline delusional. It mentioned the fire at Grenfell, where her government has been inchingly slow at dealing with other tower blocks with similar cladding. She quoted Nicholas Winton, architect of the Kindertransport, when her own government was reluctant to let child refugees from Syria enter the country. “Never forget that compromise is not a dirty word. Life depends on compromise,” Winton had told her. It was a lesson she never practised during her leadership, so preaching it on her departure seemed like another sick joke.

Britain’s class, race and sex divides remain as entrenched as they were three years ago, and May has added a new, incendiary faultline to the list: Brexit as culture war. Of the 124,000 Tory activists who are likely to choose her successor, 75 per cent want a candidate who embraces no deal, according to ConservativeHome. (For comparison, YouGov found that only 30 per cent of voters overall wanted to leave without a deal.) The field to succeed May is dominated by men who say they will give those deeply unrepresentative Conservative activists what they want. And why not? The Prime Minister herself said repeatedly that no deal was no disaster.

Standing in front of that famous black door, Theresa May said she was proud to serve the country she loved, but she has left it meaner, more polarised and virtually impossible to govern. That is the true legacy of this unpopular populist, the dullest gambler ever to inhabit No 10.