Keep calm and carry on? After a spectacular backfire on a decision to call early elections, Theresa May finds herself without a parliamentary majority, and faces calls to resign. Instead, May went to Buckingham Palace earlier today to ask Queen Elizabeth II permission to form a new government, and seems to have succeeded … for now:

U.K. Prime Minister Theresa May is seeking to hold on to power after suffering a major blow in Thursday’s election in which voters took away her Conservative Party’s majority in Parliament.

May is due to visit Buckingham Palace at 12:30 pm local time to seek permission from the Queen to form a government.

With nearly all votes counted, the Conservative Party is set to end up with 319 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, is set to get 261 seats, the Scottish National Party 35, the Liberal Democrats 12 and the Democratic Unionist Party 10 seats.

In order to form a government, May had to either convince one of the smaller parties to join a coalition, or work with Jeremy Corbyn to form a unity government. The BBC reports that May will get DUP’s ten seats for her coalition and a parliamentary majority, but that creates at least a theoretical problem for May. Northern Ireland’s DUP can essentially exercise a veto on May or any Tory policy by threatening to join the opposition on a no-confidence vote, although DUP does have a fairly conservative agenda themselves. And of course, DUP will now have to be consulted on any policies in the new government and will likely get a ministry as a price for their support.

It’s a stunning reversal for May, whose decision to hold an election had been seen initially as a smart strategic move. The Tories had been riding high, and the election reset the timetable around the Brexit talks. She had expected to gain a larger majority in order to shepherd through a divorce agreement with the rest of Europe. Now, Brexit suddenly looks shaky:

Guenther Oettinger, a German member of the European Commission, said Friday that the election result had left it unclear whether negotiations between the U.K. and Europe on Britain’s exit from the EU could be launched on June 19 as planned. The EU was hoping for a stable British government to help ensure smooth divorce negotiations ahead of Britain’s departure in March 2019.

“We need a government that can act,” Oettinger told radio station Deutschlandfunk, according to the Reuters news agency. “With a weak negotiating partner, there’s the danger than the negotiations will turn out badly for both sides… I expect more uncertainty now.”

Echoing Oettinger’s skepticism about negotiating with what could essentially be a lame-duck government in London, Michel Barnier, the EU official tasked with leading the Brexit negotiations, said Friday that the talks should only begin “when the U.K. is ready.” He added, however, that the overall two-year timetable for Brexit to be made official would not change, and that Europe’s positions remained clear.

In other words, it’s going to be a lot easier for the EU to issue take-it-or-leave-it demands of the UK without a strong negotiating adversary in London, and this election has all but eliminated that strength for May. DUP also supports Brexit but might push for new conditions that May might not be able to deliver.

May, in announcing the coalition, declared that “what the country needs more than ever is certainty.” The UK had a lot more of that before May called for a snap election. The biggest uncertainty now is how long the Tories will keep May as its party leader after this debacle.