Britain's Prime Minister Theresa May listens as the declaration at her constituency is made for in the general election in Maidenhead, England, Friday, June 9, 2017. British Prime Minister Theresa May's gamble in calling an early election appeared Friday to have backfired spectacularly, after an exit poll suggested her Conservative Party could lose its majority in Parliament. (AP Photo/Alastair Grant)
Alastair Grant/AP
Britain's Prime Minister Theresa May listens as the declaration at her constituency is made for in the general election in Maidenhead, England, Friday, June 9, 2017. British Prime Minister Theresa May's gamble in calling an early election appeared Friday to have backfired spectacularly, after an exit poll suggested her Conservative Party could lose its majority in Parliament. (AP Photo/Alastair Grant)
Now playing
01:52
How an extraordinary UK election unfolded
MAIDENHEAD, ENGLAND - JUNE 09:  British Prime Minister and Conservative Party leader Theresa May speaks at the declaration at the election count at the Magnet Leisure Centre on June 9, 2017 in Maidenhead, England. After a snap election was called, the United Kingdom went to the polls yesterday following a closely fought election. The results from across the country are being counted and an overall result is expected in the early hours.  (Photo by Matt Cardy/Getty Images)
Matt Cardy/Getty Images Europe/Getty Images
MAIDENHEAD, ENGLAND - JUNE 09: British Prime Minister and Conservative Party leader Theresa May speaks at the declaration at the election count at the Magnet Leisure Centre on June 9, 2017 in Maidenhead, England. After a snap election was called, the United Kingdom went to the polls yesterday following a closely fought election. The results from across the country are being counted and an overall result is expected in the early hours. (Photo by Matt Cardy/Getty Images)
Now playing
01:29
Election shock undercuts UK on world stage
A graph on a trader's screen shows the fall of pound sterling that occurred when the first general election exit poll was released on June 8, 2017, as Britain's Prime Minister Theresa May is seen speaing on a television beyond, on the trading floor of ETX Capital in London on June 9, 2017, the day after Britain held a general election, in which the ruling Conservatives lost their parliamentary majority.
With Brexit talks due to begin in just over a week, Britain's shock election results may soften the government's strategy -- if there is even a government formed to negotiate in Brussels by then. The pound fell sharply amid fears the Conservative leader will be unable to form a government and could even be forced out of office after a troubled campaign overshadowed by two terror attacks. / AFP PHOTO / Glyn KIRK        (Photo credit should read GLYN KIRK/AFP/Getty Images)
GLYN KIRK/AFP/AFP/Getty Images
A graph on a trader's screen shows the fall of pound sterling that occurred when the first general election exit poll was released on June 8, 2017, as Britain's Prime Minister Theresa May is seen speaing on a television beyond, on the trading floor of ETX Capital in London on June 9, 2017, the day after Britain held a general election, in which the ruling Conservatives lost their parliamentary majority. With Brexit talks due to begin in just over a week, Britain's shock election results may soften the government's strategy -- if there is even a government formed to negotiate in Brussels by then. The pound fell sharply amid fears the Conservative leader will be unable to form a government and could even be forced out of office after a troubled campaign overshadowed by two terror attacks. / AFP PHOTO / Glyn KIRK (Photo credit should read GLYN KIRK/AFP/Getty Images)
Now playing
01:20
What the UK election means for the economy
Britain's Prime Minister and leader of the Conservative Party Theresa May delivers a statement outside 10 Downing Street in central London on June 9, 2017 as results from a snap general election show the Conservatives have lost their majority.
British Prime Minister Theresa May faced pressure to resign on June 9 after losing her parliamentary majority, plunging the country into uncertainty as Brexit talks loom. / AFP PHOTO / Justin TALLIS        (Photo credit should read JUSTIN TALLIS/AFP/Getty Images)
JUSTIN TALLIS/AFP/Getty Images
Britain's Prime Minister and leader of the Conservative Party Theresa May delivers a statement outside 10 Downing Street in central London on June 9, 2017 as results from a snap general election show the Conservatives have lost their majority. British Prime Minister Theresa May faced pressure to resign on June 9 after losing her parliamentary majority, plunging the country into uncertainty as Brexit talks loom. / AFP PHOTO / Justin TALLIS (Photo credit should read JUSTIN TALLIS/AFP/Getty Images)
Now playing
02:37
'Let's get back to work': May's full speech
CNNI
Now playing
01:52
Corbyn: Make way for government for the people
Now playing
02:15
Theresa May: UK needs a period of stability
British Prime Minister Theresa May leaves 10 Downing Street in central London on April 19, 2017 ahead of the weekly Prime Minister's Questions session in the House of Commons. 

British Prime Minister Theresa May called on April 18 for a snap election on June 8, in a shock move as she seeks to bolster her position before tough talks on leaving the EU. MPs are set to vote on the motion following Prime Minister's Questions in the House of Commons. / AFP PHOTO / CHRIS J RATCLIFFE        (Photo credit should read CHRIS J RATCLIFFE/AFP/Getty Images)
CHRIS J RATCLIFFE/AFP/Getty Images
British Prime Minister Theresa May leaves 10 Downing Street in central London on April 19, 2017 ahead of the weekly Prime Minister's Questions session in the House of Commons. British Prime Minister Theresa May called on April 18 for a snap election on June 8, in a shock move as she seeks to bolster her position before tough talks on leaving the EU. MPs are set to vote on the motion following Prime Minister's Questions in the House of Commons. / AFP PHOTO / CHRIS J RATCLIFFE (Photo credit should read CHRIS J RATCLIFFE/AFP/Getty Images)
Now playing
01:14
Theresa May: What you need to know
LONDON, ENGLAND - JUNE 09:  Labour Leader Jeremy Corbyn leaves his home on June 9, 2017 in London, England. After a snap election was called by Prime Minister Theresa May the United Kingdom went to the polls yesterday. The closely fought election has failed to return a clear overall majority winner and a hung parliament has been declared.  (Photo by Christopher Furlong/Getty Images)
Christopher Furlong/Getty Images
LONDON, ENGLAND - JUNE 09: Labour Leader Jeremy Corbyn leaves his home on June 9, 2017 in London, England. After a snap election was called by Prime Minister Theresa May the United Kingdom went to the polls yesterday. The closely fought election has failed to return a clear overall majority winner and a hung parliament has been declared. (Photo by Christopher Furlong/Getty Images)
Now playing
01:16
What to know about Jeremy Corbyn
Now playing
01:38
Nigel Farage: Theresa May is toast
Now playing
00:50
Labour Party leader: Theresa May a damaged PM
Now playing
01:56
Boris Johnson: Listen to our constituents
Now playing
01:46
UK election polls shock markets
A Union flag flies near the The Elizabeth Tower, commonly known Big Ben, and the Houses of Parliament in London on February 1, 2017.
British MPs are expected Wednesday to approve the first stage of a bill empowering Prime Minister Theresa May to start pulling Britain out of the European Union. Ahead of the vote, which was scheduled to take place at 7:00 pm (1900 GMT), MPs were debating the legislation which would allow the government to trigger Article 50 of the EU's Lisbon Treaty, formally beginning two years of exit negotiations. / AFP / Daniel LEAL-OLIVAS        (Photo credit should read DANIEL LEAL-OLIVAS/AFP/Getty Images)
DANIEL LEAL-OLIVAS/AFP/AFP/Getty Images
A Union flag flies near the The Elizabeth Tower, commonly known Big Ben, and the Houses of Parliament in London on February 1, 2017. British MPs are expected Wednesday to approve the first stage of a bill empowering Prime Minister Theresa May to start pulling Britain out of the European Union. Ahead of the vote, which was scheduled to take place at 7:00 pm (1900 GMT), MPs were debating the legislation which would allow the government to trigger Article 50 of the EU's Lisbon Treaty, formally beginning two years of exit negotiations. / AFP / Daniel LEAL-OLIVAS (Photo credit should read DANIEL LEAL-OLIVAS/AFP/Getty Images)
Now playing
02:38
The year that rocked British politics
Britain's main opposition Labour Party leader Jeremy Corbyn waves as he arrives to address supporters at a campaign visit in Colwyn Bay, north Wales on June 7, 2017, on the eve of the general election.
Britain on Wednesday headed into the final day of campaigning for a general election darkened and dominated by jihadist attacks in two cities, leaving forecasters struggling to predict an outcome on polling day. / AFP PHOTO / Oli SCARFF        (Photo credit should read OLI SCARFF/AFP/Getty Images)
OLI SCARFF/AFP/Getty Images
Britain's main opposition Labour Party leader Jeremy Corbyn waves as he arrives to address supporters at a campaign visit in Colwyn Bay, north Wales on June 7, 2017, on the eve of the general election. Britain on Wednesday headed into the final day of campaigning for a general election darkened and dominated by jihadist attacks in two cities, leaving forecasters struggling to predict an outcome on polling day. / AFP PHOTO / Oli SCARFF (Photo credit should read OLI SCARFF/AFP/Getty Images)
Now playing
02:56
Jeremy Corbyn: The face of UK's Labour party
(CNN) —  

British Prime Minister Theresa May has pledged to form a government that will provide “certainty” and guide the country through Brexit, 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 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.”

But Brexit talks – which are due to start in 10 day’s time – could be delayed and the Prime Minister’s personal authority undermined by the shock result.

In a night of high drama, May’s party shed seats to Jeremy Corbyn’s Labour, which surpassed expectations, leaving the Conservatives short of a working majority by just eight seats.

The result is an embarrassing turn for May who called the election three years earlier than required, to give her side a strong negotiating hand in Brexit negotiations.

One of the lead negotiators for the European Union, Guy Verhofstadt, criticized May on Twitter, writing: “Yet another own goal, after Cameron now May, will make already complex negotiations even more complicated.”

Donald Tusk, president of the European Council, added: “We don’t when Brexit talks start. We know when they must end.”

’Catastrophic’ results

The result also prompted criticism of May from within her own ranks as well as from the opposition.

READ: General election 2017 – Live updates

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.

Conservative MP Nigel Evans told CNN his party shot itself “in the head” with an “irrelevant” manifesto, which was peppered with “arsenic”.

Meanwhile, 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.

May looks to the DUP

To pass new legislation, May has turned to the DUP, a small party from Northern Ireland known for pursuing a more socially conservative agenda than the Tories.

Democratic Unionist Party (DUP) leader Arlene Foster says she will speak to Theresa May.
PAUL FAITH/AFP/Getty Images
Democratic Unionist Party (DUP) leader Arlene Foster says she will speak to Theresa May.

While the party backed Britain’s exit from the European Union, it has pushed back in the past against a “hard Brexit”.

Speaking Friday, leader Arlene Foster said her party would enter into discussions with the Prime Minister to “bring stability to our nation at this time of great challenge.”

Rather than an official coalition, the partnership is likely to be on an issue by issue basis. But May is likely to attract criticism for the decision because of the DUP’s stance on same-sex marriage and abortion rights.

Upsets elsewhere

While the election brought a good result for the DUP, there were upsets elsewhere in the UK.

In Scotland, the Scottish National Party dropped a number of seats, as the Conservative Party made some rare gains.

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.

The Prime Minister 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.

Although called as a Brexit election, the campaign was quickly overshadowed by security as two deadly terror attacks, in Manchester and London, struck.

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.

CNN’s Carol Jordan, Richard A. Greene, Melissa Mahtani and Bryony Jones contributed to this report.