UK Prime Minister Theresa May says she will form a new government despite losing majority: 'Let's get to work' The Conservative Party leader suffered a major blow in Thursday's election.

 LONDON -- U.K. Prime Minister Theresa May said she will lead a minority government backed by a small Northern Irish party after Thursday's stunning election defeat that cost her Conservative Party its majority.

"I will now form a government," May said in a speech outside her official residence at No. 10 Downing Street after meeting with Queen Elizabeth at Buckingham Palace on Friday. She said that she will work with Northern Ireland's Democratic Unionist Party and that her government will lead the country forward at a "critical" time.

"What the country needs more than ever is certainty and having secured the largest number of votes and the greatest number of seats in the General Election it is clear that only the Conservative and Unionist Party has the legitimacy and ability to provide that certainty by commanding a majority in the House of Commons," she said, using the official name of her party. "As we do, we will continue to work with our friends and allies in the Democratic Unionist Party in particular."

May said that her government would lead the country through upcoming Brexit negotiations with the European Union, and that she will work to keep the country safe following the recent attacks in London and Manchester.

"Now let's get to work," she said before entering No. 10 Downing Street.

Her remarks made clear that she is planning to form a minority government with backing from the DUP -- rather than entering a formal coalition with the party. If that plan becomes a reality, the DUP would not hold any ministerial posts, but provide support for the Conservative government, which would depend on DUP votes in order to hold on to power. It is still not clear what the DUP would get in return for its support.

"I certainly think that there will be contact made over the weekend, but I think it's too soon to talk about what we're going to do," DUP leader Arlene Foster said, speaking to BBC Radio Ulster. "I think we need to wait and see.”

The DUP has close ties with the Conservatives, and it is in favor of the U.K.'s withdrawal from the European Union.

With nearly all votes counted, the Conservative Party has 318 seats, according to the BBC. That is short of the 326 needed for an overall majority –- and 12 fewer than when May called the election. The opposition Labour Party, led by Jeremy Corbyn, has 261 seats, the Scottish National Party has 35, and the Liberal Democrats 12. The Democratic Unionist Party won 10 seats. Together, the Conservatives and the DUP would have 328 seats in parliament, just above the 326 needed.

May called a snap election in April in what she said was an attempt to strengthen her mandate ahead of negotiations with the European Union about the British exit from the bloc. At the time, polls suggested her party would win with a big majority.

Instead, her gamble backfired as the election took away the Conservative majority and sent the country into political turmoil.

The stunning election result comes after a campaign in which May lost popularity over her style and some of her social care policies, including a so-called "dementia tax" that would force the elderly to pay more for their care.

A very personalized, almost presidential style of campaigning has contributed to the Conservative Party's loss of support, said Mark Goodwin, lecturer at the department of political science and international studies at the University of Birmingham in England.

"Theresa May has been in British politics for quite a long time, but she is not somebody with a huge media profile or who is associated with particular policy positions," Goodwin told ABC News ahead of election day. "She seems to have found it very difficult to kind of do the baby-kissing part of campaigning."

Even though the gap between the Conservatives and Labour narrowed during the campaign, polls had generally predicted that the Conservatives would win a majority of votes.