Prime Minister Theresa May was popular once. That may be hard to remember as she steps down in two weeks' time, but it's true. Just three years before her own political party forced her to step aside, she was hailed by politicians and citizens as the wisest choice to lead the U.K.'s separation from the European Union.

Then came the reality of Brexit and the political stalemate she was unable to break. History will judge her by that failure, which has hardened national divisions and hollowed out the centre of British politics. But it's not fair to assess May's legacy without separating the things she could control from the things that were out of her hands.

May had slid quietly into her position. When Prime Minister David Cameron resigned after the shock of the 2016 Brexit referendum, it seemed a foregone conclusion that charismatic Boris Johnson would succeed him. But Johnson withdrew after being betrayed by another hardline Brexiter, Michael Gove, who accused him of lacking character. Now the former foreign secretary is the front runner to succeed her.

May wasn't an obvious choice then, but she quickly became a popular one in the months after the referendum. In August, 2016, she was regarded favourably by 48 per cent of all voters and unfavourably by 36 per cent, opinion polls showed. In July that year, 52 per cent of those asked said that May would make the best prime minister; only 18 per cent said the same of opposition Labour leader Jeremy Corbyn. 

People weren't looking for magnetism in a leader so much as a cool head and the ability to unite. May exuded the qualities of a dutiful public servant and a steadfast leader. As the longest-serving home secretary, a job that is often the graveyard of political ambitions, she built a reputation as a master of detail who would stick to a position until she wore down or outlasted her opponents. When Conservative lawmaker Kenneth Clarke referred to her accidentally on camera as a "bloody difficult woman," most saw it as a compliment, intended or not. Margaret Thatcher, after all, was difficult too.  

A vicar's daughter and lifelong Conservative Party member, her work ethic and sincerity went without saying. Her most famous phrase, other than "Brexit means Brexit," was "politics is not a game." Hers was a working-class conservative vision, at odds with the Etonian worldview of her predecessor. The timing seemed right for it, too. 

"May's good fortune is that she is prime minister at a time when the electoral potency of her philosophy is at its greatest," conservative journalist and activist Mark Wallace wrote in the Guardian in 2017.

After the referendum, May spoke movingly to the whole country, but especially to the people whom she referred to as "just about managing." By that she meant voters hard-hit by years of austerity and whiplashed by globalization and the widening gap between their skills and the demands of the modern workplace. They put Brexit over the line and May saw it as her job as to listen to them.

WHAT HAPPENED TO ALL THAT PROMISE?

One thing that happened was the 2017 election. She hoped to ride her popularity to a sweeping Conservative victory that would strengthen her Brexit hand at home and in Brussels. Government ministers were essentially sidelined as the campaign focused less on the Conservative Party and more on its "strong and stable" leader. But campaigning requires a level of relatability that May lacked, and her opponent, Corbyn, had in spades. The slogan descended into self-parody. May's wooden appearances didn't help. She was mocked as the Maybot.

To say that train wreck of an election sowed the seeds of her downfall misses the point. Yes, May ran a horrible campaign and the Conservative Party lost its parliamentary majority. Yes, she had to then make the fateful decision of entering into a confidence-and-supply agreement with the Democratic Unionist Party, whose 10 Northern Irish MPs would later hold the fate of the government Brexit plan in their hands. But two crucial contributors to her problems were independent of the electoral setback: the divisive Brexit vote itself, and May's flawed leadership and communication style.

People tend to dwell on the latter, blaming her failures on an absence of charisma, but it's the cocktail of the two that was toxic. Just ask: If you added charisma to May's other qualities, would the outcome have been different? 

She is undeniably wooden; comparing her to Brexit Party leader Nigel Farage is like comparing rice to paella. She's not the first Tory leader with that deficit. Edward Heath — described as "vain, rude, penny-pinching" — was so lacking in magnetism when he occupied 10 Downing Street in the early 1970s that journalists checked their watches when he addressed them. John Major, prime minister for most of the 1990s, was known as a "dull man in a grey suit." The fact that neither were regarded as successful prime ministers may justify the focus on this quality — and will prompt many Conservatives to pick Johnson as their next leader.

The public retained some of its early admiration for May as she battled to get her agreement to leave the EU through Parliament, but support drained away. By late March, 65 per cent of the public held a negative opinion of her. May seemed adrift, unable to do anything but push the same rejected plan. A low point came when she addressed the nation late one night to harangue MPs for not making a decision.

It wasn't just Brits who felt exasperated. EU leaders barely hid their own frustrations. At successive EU summits, the mood went from commiseration and empathy to despair at May's style. One member of the European Parliament, the Belgian Philippe Lamberts, complained to reporters that May was "devoid of the basic human skills needed for a leader."

May's fall partly came because her strengths — determination, loyalty to her party, ability to resist pressure — were also weaknesses. The flip side of her steely resolve was intransigence. The flip side of her loyalty to party was an inability to make decisions that would be unpopular with a small but powerful part of it. The flip side of her sense of duty was an allergy to compromise.

It didn't help that May had few friends. She is a private person who relied on so small a group of advisers that, to some, only her husband Philip really knew where she stood. She seemed out of touch with the mood in her party and the public. Her cabinet members were so disloyal and mistrustful that discussions in meetings were leaked in gruesome detail. Not even Security Council proceedings were safe, and May had to fire her defense minister after word got out on a matter involving the role of the Chinese telecommunications giant Huawei in building Britain's 5G network.

May drew one overriding conclusion from the 2016 Brexit vote that fitted with her own experience as Home Secretary and had major consequences for what followed. The public, she felt, wanted government to assert control over Britain’s borders, which meant ending the U.K.'s membership of the EU single market, which guarantees the free movement of goods, services, capital and labor. Even as the country’s attitudes toward immigration softened, May doubled down, determined to take Britain out of the single market and to clampdown on migration by low-skilled workers.

Ending frictionless trade, however, would have economic costs. The EU refused to divide its four freedoms, though May tried. For hardline Brexiters, the answer was that the U.K. would leave the EU's customs union and cut its own advantageous trade deals. The idea that "Global Britain" had the economic power to overcome the loss of its membership of the world's largest single market was debunked by trade experts. But it made for a neat slogan, and thus trade deals became shorthand for freedom.

May's red lines — leaving the single market and leaving the customs union – decided before she understood the consequences and never redrawn, led her to make three promises that were both non-negotiable and collectively unattainable. She promised to honor the 1998 Good Friday Agreement that ended 30 years of Northern Irish sectarian violence and established an open border with Ireland; to take Britain out of the customs union; and to treat Northern Ireland no differently from the rest of the U.K. She could have any two of those, but not all three.

Even if no postwar prime minister has faced such a major economic, political and constitutional challenge, May's big decisions were ill-conceived. Under immense pressure from her party, she triggered Article 50 of the EU treaty, which started the two-year countdown to exit day. That was done before real preparations for departure had begun, before the government had thought through what it wanted to achieve and decided what might be feasible. There was the 2017 election campaign, which burned through months that should have been spent negotiating and planning. There was the failure to consult across the party divide and build a consensus on what kind of future trading relationship Britain wanted. Seasoned EU experts such as Ivan Rogers were sidelined. 

There is, of course, plenty of blame to go around. The previous Parliament voted 10-to-one to hold the 2016 referendum, and the present one voted overwhelmingly to trigger Article 50. The Labour Party had nothing useful to say about Brexit for most of the time it was being debated, because its own base was divided as was its leadership. Both May and her Conservative critics underestimated the resolve and negotiating muscle of the EU.

There were glimpses in the past three years of a Prime Minister May who might have been. Her early appeal to the 48 per cent that voted to Remain (she was among them) was one. There was also her 2018 party conference speech, in which she rejected the populism of U.S. President Donald Trump, decried the polarization of politics, defended capitalism, and pitched for the center ground. And yet the unifying, centrist language remained rhetorical. She never followed through. Brexit consumed the oxygen available for other issues.

The unforgivable error was failing to stand up to Brexiters who repeatedly pushed her into untenable negotiating positions. Her insistence that "no deal is better than a bad deal" may have been justifiable as a tactic in early stages of negotiations, but it was never credible. It normalized the false hope among many voters that leaving without a deal could be done without dire economic consequences. Her failure to challenge and resist her hardliners left her open to the accusation that she prized party unity over the national interest and ended up undermining both.

For all her undeniable resilience and determination, none of the goals she set for her premiership — delivering Brexit, tackling social injustices and strengthening the union with Scotland, Wales and Northern Ireland — were delivered.

The question of where May went wrong is more than just academic. The Conservative Party has torn itself up over Europe for years. Conflict over the U.K.-EU relationship has ended the career of every Conservative leader since Thatcher left office in 1990. But it has managed to be pragmatic in crisis and has found ways to keep deep ideological divisions from consuming it, so far. May’s term has made them worse. 

A new election can't be far off. And for all the drama of recent months, the most difficult negotiations over how Britain will leave the EU are only beginning. In the next two or more years, the U.K. will negotiate its future trading relationship with its closest neighbor, largest trading partner and historic ally. The Conservative Party doesn't just need to decide who will lead it but, more importantly, what it stands for.