LONDON (CNN) -- British Prime Minister Theresa May has pledged to form a government that will provide "certainty" and guide the country through Brexit, just hours after voters delivered her party a huge blow at the polls.
May, who visited Buckingham Palace to meet with Queen Elizabeth II Friday, said she would work in particular with Northern Ireland's Democratic Unionist Party, which she described as her "friends and allies"
Promising to move towards a Brexit deal, enabling Britain to exit the European Union, May said the new government would "be able to work together in the interests of the whole United Kingdom."
Brexit talks -- due to start in 10 day's time -- may be delayed and the Prime Minister's personal authority undermined by the shock result, which left the Conservatives short of a working majority by just eight seats.
It's an embarrassing turn for May who called the snap election three years earlier than required by law, convinced by opinion polls that seemed to place her in a strong position.
In a night of high drama across the UK, her party shed seats to Jeremy Corbyn's Labour, which surpassed expectations.
For May, who called the snap election in April, the failure to gain a large majority already has critics sniping.
George Osborne, the former finance minister who stepped down at the election, told ITV that the results were "catastrophic" for his party. Anna Soubry, a Conservative MP, said May would have to consider her position.
Meawhile, Corbyn said the early results showed May had lost her mandate and called for her to resign.
"People have said they have had quite enough of austerity politics," he said, repeating his campaign promises to push for better funding for health and education.
After the result was declared in her constituency of Maidenhead, May gave a faltering speech. "At this time more than anything else, this country needs a period of stability," she said, suggesting she would attempt to form a government even if her party loses its majority.
There were upsets elsewhere in the UK: In Scotland. the Scottish National Party was on course for significant losses. The former leader, Alex Salmond, lost his seat, as the Conservative Party made some rare gains in Scotland.
The anti-Brexit Liberal Democrat Party did not make its hoped-for inroads. Former leader Nick Clegg, a former Deputy Prime Minister, lost his Sheffield Hallam seat. Tim Farron, the current leader, retained his seat with only a narrow majority.
Home Secretary Amber Rudd, one of May's closest allies, barely held onto her seat of Hastings and Rye, after a recount put her just over 300 votes ahead of the Labour candidate.
May experienced a gradual slide during the campaign period, in which a wide gap between the Conservatives and Labour narrowed.
Predictions of Conservative success became more modest as the party's campaign faltered following a series of missteps.
May was criticized for making a number of U-turns on social welfare and she came under fire for a controversial proposal on who should pay for the cost of care for the elderly, a policy that became known as the "dementia tax."
Her opponents also took issue with her refusal to take part in a televised debate with other party leaders.
The Prime Minister called what she thought would be a Brexit-focused election, but the issue was quickly overshadowed by security as two deadly terror attacks, in Manchester and London, struck during the campaign period.
The attacks only put May under more scrutiny for national security decisions she made during her tenure as Home Secretary, a role she held for six years in the government of her predecessor, David Cameron.
The attacks triggered a heated debate on whether the police are well-enough resourced to deal with terror threats. Police numbers across the UK were cut by 20,000 under May's watch as Home Secretary.