The Democratic Unionists are the harder-line, mainly Protestant party in Northern Ireland and support Brexit. And they are particularly committed to keeping Mr. Corbyn out of power because of his history of sympathy with Irish Republicans, including Sinn Fein, which was the political wing of the Irish Republican Army.

Arlene Foster, leader of the D.U.P., said that she had spoken to Mrs. May, “but I think it is too soon to talk about what we’re going to do.” She said she would explore with Mrs. May “how we can help bring stability to our nation.”

But earlier Friday, Mrs. Foster was not optimistic about the tenure of Mrs. May, saying, “It will be difficult for her to survive given that she was presumed at the start of the campaign, which seems an awfully long time ago, to come back with maybe a hundred, maybe more, in terms of her majority.”

Mrs. May is certain to face demands from lawmakers in her own party that she change her leadership style and consult more widely. Nigel Evans, a senior Conservative lawmaker, blamed the party’s manifesto, which had been prepared by a small group and hit traditional Tory supporters. “We didn’t shoot ourselves in the foot; we shot ourselves in the head,” he told the BBC.

For the past year, the debate about the exit from the European Union in Britain has been limited to vague promises of repatriating British funds from the European budget, controlling immigration and negotiating a favorable trade deal. Britons have heard little about the cost of leaving the world’s biggest free-trade bloc — not least the tens of billions of pounds owed to Brussels for existing liabilities such as pension obligations and investment commitments in the current European Union budget.

“The British public have not at all been prepared for having to pay a large check to Brussels to settle our debts in this divorce,” Mr. Ricketts said.