Theresa May became Britain's second female prime minister last July but, unlike her predecessor Margaret Thatcher, she came to power without winning an election.
The Conservative leader had hoped to put that right by convincing voters that she was the tough, competent leader the country needed to steer it through difficult times.
But her decision to call a snap election left her facing the humiliation of ending with fewer seats than when she called the vote.
A Conservative colleague once called her "a bloody difficult woman", when he thought no-one was listening, and she now wears that description as a badge of honour. Others have described her as "rigid" and "inflexible".
But until she moved into Downing Street, following the resignation of David Cameron, she was, in truth, something of a mystery, even to many in her own party.
She is an intensely private politician, by modern standards, and has rarely opened up about her personal feelings or beliefs.
Like Mr Cameron, she had been against Brexit but she cleverly managed to keep the Eurosceptics in her party on side during the referendum campaign by keeping a low profile.
She reaped her reward by emerging as the unchallenged successor to Mr Cameron, as other potential rivals fell by the wayside - portraying herself as a steady pair of hands who would deliver the will of the people and take Britain out of the EU in as orderly a fashion as possible.
But that image was called into question by some when she announced a snap general election, after previously insisting she did not want to go to the country before she had to, in 2020, to avoid unnecessary instability.
Her reasoning for the snap poll - that she wanted to strengthen her hand in Brexit negotiations - was attacked by critics on the left as a divisive move, designed to stifle legitimate criticism and paint anyone who disagreed with her approach to talks with Brussels as a "Brexit wrecker".
Her tub-thumping vows to "fight for Britain" went down a storm with the right-wing press, who embraced her in a way that they never did Mr Cameron, whom they tended to see as a privileged member of the "Metropolitan elite".
But her repeated offer of "strong and stable" leadership was not enough to win her an overall majority.
Who is Theresa May?
- Date of birth: 1 October 1956 (aged 60)
- Job: MP for Maidenhead since 1997. Home Secretary since May 2010
- Education: Mainly state-educated at Wheatley Park Comprehensive School with a brief time at an independent school; St Hugh's College, Oxford
- Family: Married to Philip May
- Hobbies: Cooking - she says she owns 100 recipe books. Occasional mountain walks. On BBC Radio 4's Desert Island Discs in 2014, she chose Abba's Dancing Queen and Walk Like A Man, from the musical Jersey Boys, among her picks, alongside Mozart and Elgar. She chose a subscription to Vogue as her luxury item, reflecting her lifelong love of high fashion.
The daughter of a Church of England vicar, Hubert, who died from injuries sustained in a car crash when she was 25, Mrs May said her father had taught her to "take people as you find them" and "treat everyone equally".
Born in Eastbourne, East Sussex, but raised largely in Oxfordshire, she attended a state primary, an independent convent school and then a grammar school in the village of Wheatley, which became the Wheatley Park Comprehensive School during her time there.
The young Theresa Brasier, as she was then, threw herself into village life, taking part in a pantomime that was produced by her father and working in the bakery on Saturdays to earn pocket money.
She has described growing up in a vicarage as "different" but useful because "you get to meet a whole range of people from all types of background".
Friends recall a tall, fashion-conscious young woman who, from an early age, spoke of her ambition to be the first woman prime minister.
Like Margaret Thatcher, she went to Oxford University to study and, like so many others of her generation, found that her personal and political lives soon became closely intertwined.
In 1976, in her third year, she met her husband Philip, who was two years younger than her and president of the Oxford Union, a well-known breeding ground for future political leaders.
They were introduced at a Conservative Association disco by future Pakistani prime minister Benazir Bhutto. Both claim it was "love at first sight". They married in 1980.
Her university friend Pat Frankland, speaking in 2011 on a BBC Radio 4 profile of the then home secretary, said: "I cannot remember a time when she did not have political ambitions.
"I well remember, at the time, that she did want to become the first woman prime minister and she was quite irritated when Margaret Thatcher got there first."
Mrs May says she wanted to be an MP as a child but does not recognise stories about her early prime ministerial ambitions.
In their first broadcast interview together, on the BBC's The One Show, Philip May, a City fund manager, said he had "never heard Theresa say she wanted to be prime minister until she was well-established in the shadow cabinet".
May in her own words
"Remaining inside the European Union does make us more secure, it does make us more prosperous and it does make us more influential beyond our shores," speaking in April 2016, before the EU referendum.
"The referendum result was clear. It was legitimate. It was the biggest vote for change this country has ever known. Brexit means Brexit - and we're going to make a success of it," speaking in January 2017.
"One of the things my father taught me is that you should take people as you find them, not have any preconceptions about people and treat everybody equally. That was an important lesson that I had," speaking on the BBC's The One Show.
"During the Conservative Party leadership campaign I was described by one of my colleagues as a bloody difficult woman. And I said at the time the next person to find that out will be Jean-Claude Juncker," speaking to the BBC earlier this month.
"There's a lot we need to do in this party of ours. Our base is too narrow and so, occasionally, are our sympathies. You know what some people call us - the nasty party," speech to the 2002 Conservative Party conference.
There are no tales of drunken student revelry from Mrs May's time at Oxford, but Pat Frankland and other friends say she was not the austere figure she would later come to be seen as, suggesting she had a sense of fun and a full social life.
After graduating with a degree in geography, May went to work in the City, initially starting work at the Bank of England and later rising to become head of the European Affairs Unit of the Association for Payment Clearing Services.
But it was already clear that she saw her future in politics. She was elected as a local councillor in Merton, south London, and served her ward for a decade, rising to become deputy leader. However, she was soon setting her sights even higher.
Mrs May, who has become a confidante as well as role model for aspiring female MPs, told prospective candidates before the 2015 election that "there is always a seat out there with your name on it".
What others say
"She is instinctively secretive and very rigid, but you can be tough with her and she'll go away and think it all through again," former Lib Dem leader Nick Clegg.
"Theresa is a bloody difficult woman... I get on all right with her and she is good. She's too narrow on her department... She's been at the Home Office far too long... she doesn't know much about foreign affairs," veteran Conservative MP Ken Clarke, pictured.
"She hides when things go wrong. No interviews, no quotes, nothing to reassure people or to remind people she even exists," former shadow home secretary Yvette Cooper.
"The prime minister has a strict trio of personal topics that she is prepared to discuss in public: shoes, clothes and cooking. Beyond that, she is content to let voters judge her on achievements," Sebastian Payne, writing in the Financial Times.
In her case - like that of Margaret Thatcher - it took a bit of time for her to find hers. She first dipped her toe in the water in 1992, where she stood in the safe Labour seat of North West Durham, coming a distant second to Hilary Armstrong, who went on to become Labour's chief whip in the Blair government. Her fellow candidates in that contest also included a very youthful Tim Farron, who is now Lib Dem leader.
Two years later, she stood in Barking, east London, in a by-election where - with the Conservative government at the height of its unpopularity - she got fewer than 2,000 votes and saw her vote share dip more than 20%. But her luck was about to change.
The Conservatives' electoral fortunes may have hit a nadir in 1997, when Tony Blair came to power in a Labour landslide, but there was a silver lining for the party and for the aspiring politician when she won the seat of Maidenhead in Berkshire, having beaten her future chancellor Philip Hammond to be selected as the candidate. It's a seat she has held ever since.
An early advocate of Conservative "modernisation" in the wilderness years that followed, Mrs May quickly joined the shadow cabinet in 1999, under William Hague, as shadow education secretary and in 2002 she became the party's first female chairman under Iain Duncan Smith.
She launched a drive to get more women selected as Conservative candidates in winnable seats but antagonised the party's grass roots by telling them in a conference speech that they were still seen by some as "the nasty party" and had to change their ways.
Some activists struggled to forgive her for that but it was an early sign of her willingness to deliver unpalatable home truths.
As home secretary, she was booed offstage by angry officers at the Police Federation annual conference, after she had told them they should welcome her reforms and "stop pretending" they were being "picked on" by the government.
After Iain Duncan Smith's brief, chaotic reign as Tory leader, Mrs May held a range of senior posts under his successor Michael Howard.
But she was conspicuously not part of the "Notting Hill set" which grabbed control of the party after its third successive defeat in 2005 and laid David Cameron and George Osborne's path to power.
This was perhaps reflected in the fact that she was initially given the rather underwhelming job of shadow leader of the House of Commons. But she gradually raised her standing and by 2009 had become shadow work and pensions secretary.
Nevertheless, her promotion to the job of home secretary when the Conservatives joined with the Lib Dems to form the first coalition government in 70 years was still something of a surprise - given that Chris Grayling had been shadowing the brief in opposition.
While the Home Office turned out to be the political graveyard of many a secretary of state in previous decades, Mrs May refused to let this happen - mastering her brief with what was said to be a microscopic attention to detail and no little willingness to enter into battles with fellow ministers when she thought it necessary.
While some in Downing Street worried that the Home Office was becoming her own personal fiefdom, she engendered loyalty among her ministers and was regarded as "unmovable" as her tough-talking style met with public approval even when the department's record did not always seem so strong.
In his memoir of his time in office, former Lib Dem minister David Laws says: "She would frequently clash with George Osborne over immigration. She rarely got on anything but badly with Michael Gove. She and Cameron seemed to view each other with mutual suspicion.
"I first met her in 2010. I was sitting in my Treasury office, overlooking St James's Park, me in one armchair and the home secretary in the other, with no officials present. She looked nervous.
"I felt she was surprised to find herself as home secretary. Frankly, I didn't expect her to last more than a couple of years."
Despite her liberal instincts in some policy areas, she frequently clashed with the then deputy prime minister and Lib Dem leader Nick Clegg, particularly over her plan to increase internet surveillance to combat terrorism, dubbed the "snooper's charter" by the Lib Dems.
After one "difficult" meeting with Mr Clegg, he reportedly told David Laws: "You know, I've grown to rather like Theresa May... She's a bit of an ice maiden and has no small talk whatsoever - none. I have quite difficult meetings with her. Cameron once said, 'She's exactly like that with me too!'"
On the plus side, crime levels fell, the UK avoided a large-scale terrorist attack and in 2013, she successfully deported radical cleric Abu Qatada - something she listed as one of her proudest achievements, along with preventing the extradition to America of computer hacker Gary McKinnon.
However, the Passport Office suffered a near meltdown and she faced constant criticism over the government's failure to meet its promise to get net migration down to below 100,000 a year.
Despite the fact that she never came close to meeting this target, she has consistently refused to drop it.
Labour MP Yvette Cooper, who went up against her in the Commons as shadow home secretary, told the Guardian: "I respect her style - it is steady and serious. She is authoritative in parliament - superficial attacks on her bounce off.
"The flip side is that she is not fleet of foot when crises build, she digs in her heels (remember the Passport Agency crisis in 2014 when the backlog caused hundreds to miss their holidays, and the Border Force crisis in 2011 when border checks were axed).
"And she hides when things go wrong. No interviews, no quotes, nothing to reassure people or to remind people she even exists. It's helped her survive as home secretary - but if you are prime minister, eventually the buck has to stop."
There was a bitter public row with cabinet colleague Michael Gove over the best way to combat Islamist extremism, which ended with Mr Gove having to apologise to the prime minister and Mrs May having to sack a long-serving special adviser.
Former Conservative chancellor Ken Clarke also had run-ins with her and was recorded on camera saying that Mrs May was good at her job but a "bloody difficult woman", a bit like his former boss Mrs Thatcher.
She has rarely opened up about her private life although she revealed in 2013 that she had been diagnosed with type 1 diabetes and would require insulin injections twice a day for the rest of her life - something she says she had come to terms with and which would not affect her career.
Generally thought to be in the mainstream of Conservative thinking on most economic and law and order issues, she has also challenged convention by attacking police stop and search powers and calling for a probe into the application of Sharia law in British communities.
She also expressed a personal desire to withdraw from the European Convention on Human Rights but later said she would not pursue this as PM due to a lack of parliamentary support - an example of what many believe will be pragmatism in office.
Her social attitudes are slightly harder to pin down. She backed same-sex marriage. She expressed a personal view in 2012 that the legal limit on abortion should be lowered from 24 to 20 weeks. Along with most Conservative MPs she voted against an outright ban on foxhunting and has since promised a free vote on the issue.
What is undisputable is that at 59, Mrs May was the oldest leader to enter Downing Street since James Callaghan in 1976 and is the first prime minister since Ted Heath who does not have children.
She told the Mail on Sunday about the impact that being told they could not have children had had on the couple's marriage.
"Of course, we were both affected by it. You see friends who now have grown-up children, but you accept the hand that life deals you. Sometimes things you wish had happened don't or there are things you wish you'd been able to do, but can't. There are other couples in a similar position."
One of her first acts, on entering Downing Street, was to sack Chancellor George Osborne, which seemed to signal a clean break with the past. But, to the surprise of many, she also rescued Boris Johnson's career by appointing him foreign secretary.
She announced that her government would focus on the more neglected parts of Britain and try to help people on modest incomes who were "just about managing" - seen by some as a grab for traditional Labour territory.
It recently emerged that her top policy adviser, Nick Timothy, who has written the Conservative election manifesto, has held talks with Labour peer Lord Glasman, one of former Labour leader Ed Miliband's policy gurus.
Some of the ideas championed by Mr Miliband, including a cap on energy prices - described by David Cameron at the time as Marxist - have been echoed by Mrs May, as she shows a willingness to intervene in the free market in a way that would be anathema to many on the Tory right.
She has also backed new grammar schools, ending decades of political consensus on selective education, and ditched Mr Osborne's deficit reduction target.
Her room for manoeuvre on other issues was limited by her tiny Commons majority, although her brief time in Downing Street so far has, inevitably, been dominated by the process of divorcing the UK from the EU.
She triggered Article 50 of the Lisbon Treaty at the end of March, starting the formal two-year process that will take Britain out of the 28-nation bloc.
But despite winning a first Commons vote backing her position, she decided she needed to strengthen her grip on power to help her negotiate the kind of Brexit she wants - taking Britain out of the single market and being prepared to walk away without a trade deal if necessary.
She refused to take part in a televised leaders' debate, taking her cues from the safety-first strategy of campaign chief Sir Lynton Crosby, who steered David Cameron to his unexpected victory in 2015.
But she was not afraid to use the Brexit talks as an electioneering tool.
After initially dismissing reports of a bust-up with EU officials as "Brussels gossip", she decided to go on the attack.
Speaking after returning from Buckingham Palace, where she had informed the Queen that Parliament had been dissolved, she said: "Threats against Britain have been issued by European politicians and officials.
"All of these acts have been deliberately timed to affect the result of the general election which will take place on 8 June."
Her vow to "fight for Britain" played well in the next day's newspapers even if it left some wondering how it would affect the mood of the talks.
Mrs May wanted a mandate of her own to avoid being held to ransom on domestic policies by her own backbenchers, as well as to free her from the manifesto promises made by David Cameron in 2015.
But her repeated offer of "strong and stable" leadership was not enough to win her an overall majority.