May had called the election on April 18, urging voters to boost her 17-seat working majority in order to strengthen her hand in the Brexit negotiations.
Opinion polls at that time gave her Conservatives a 20-point lead over Labour, enough for a potentially triple-figure majority.
Here are five reasons why things went so wrong:
The Brenda factor
Many Britons viewed the election as a cynical ploy to score gains against an unpopular opposition leader, Jeremy Corbyn. After all, the country was only two years into a five-year parliament and May, after becoming prime minister last year, had repeatedly pledged not to hold new elections.
But there were others who were mindful of the toxic legacy from two referendums -- one on Scottish independence in 2014, the other on membership of the European Union in 2016 -- that left the country deeply divided. To them, a new election would simply open old wounds.
In a BBC video hugely shared on social media, a woman called Brenda seemed to speak for many after the election was announced. Asked by an interviewer in Bristol about her reaction, she wailed: "Not another one! Oh for God's sake! I can't stand this!"
May's attempt to make it an election just on Brexit leadership went badly awry in mid-May.
A row brewed over a Conservative proposal to make elderly people pay potentially unlimited amounts for care in their home -- a move that would force the sale of many family homes.
Even the pro-May conservative press rounded on the idea, branding it a "dementia tax" that would wipe out the inheritance of the middle classes.
Corbyn seized the advantage, painting May as cold and uncaring. She backed down, promising that there would be a limit on contributions to pay for care, and the government would launch a consultation paper.
But the row also shone a light on May's managerial style, of surrounding herself with a few trusted advisors. Even cabinet ministers were excluded from discussion over parts of the Tory manifesto.
May sketched plans for tightening Britain's already extensive security laws, but Corbyn shifted the debate to focus on her own six-year record as interior minister, when she oversaw thousands of budget-saving cuts in the police roll.
He pounded away on his proposal to hire more neighbourhood police, arguing these would provide a vital bulwark against jihadist radicalisation.
Refusal to debate
May refused from the outset to join a TV debate, saying she preferred "getting out and about, meeting voters and hearing directly from voters" rather than "debates where the politicians are squabbling among themselves."
Corbyn initially replied that he would not take part in the debate unless she attended, but cannily changed his mind, joining the leading candidates on the podium on May 31, with the Conservatives represented by May's interior minister, Amber Rudd.
May thus handed Corbyn the spotlight and exposed herself to accusations of political cowardice.
May sought to showcase herself as a no-nonsense, get-things-done Englishwoman in the face of a woolly, idealistic Corbyn, but the downsides of this image showed up glaringly on the campaign trail.
Her endlessly repeated mantra of "strong and stable leadership" grated for many, earning her the nickname of "Maybot", and her awkward style, favouring programmed events, compared badly with Corbyn, a veteran grassroots campaigner who enjoys meeting the public.
In a rare unscripted encounter with a voter that was filmed and went viral, May responded to a woman angry about welfare cuts with bland campaign slogans.
"Theresa May has the personal warmth, wit, oratorical ability and attractiveness of an Indesit fridge-freezer which has been faultily connected by a man called Trevor for five quid, cash in hand, and which is now full of decomposing Findus Crispy Pancakes," satirical writer Rod Liddle wrote in the conservative political weekly The Spectator.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.