BRUSSELS — European leaders are coming to Brussels on Wednesday evening as they would go to the dentist — unhappily, but necessarily — to give the embattled British prime minister, Theresa May, another extension on Brexit.Britain’s scheduled withdrawal from the European Union will be delayed, senior European officials and diplomats say, to avoid a “no-deal” hard Brexit on Friday night. The main discussion will be for how long the extension of the process should last.The president of the European Council, Donald Tusk, and the president of the European Commission, Jean-Claude Juncker, have suggested an extension until June 1, 2020, diplomats say. If Britain’s Parliament were to pass the withdrawal agreement that the government has negotiated with the bloc any time sooner, the country would leave the bloc on the first of the next month, this proposal goes.European leaders stressed that, whatever should happen in the process of withdrawal, or Brexit, the British Parliament would still have to pass the withdrawal agreement before there could be any discussions about the future relationship — even if Britain had left without an agreement first. The terms would include the major sticking point for pro-Brexit lawmakers, the so-called backstop to prevent a physical border between Northern Ireland and the south.The agreement covers technical issues concerning the withdrawal and is not up for renegotiation, European leaders say, while an associated “political declaration” covers things like trade and customs and could serve as the basis for negotiations on the future.The leaders of the other 27 member states will decide on the length of any extension and other matters late Wednesday night after hearing out Mrs. May. The debate will be mostly over tactics: whether this long extension puts more pressure on Parliament to pass the withdrawal agreement quickly, or whether, as Austria and a handful of other countries believe, an extension just until the end of June would be the best way to accomplish that goal.“That is a tactical issue and a political decision, and the leaders will come to a decision on that,” a senior European diplomat said. “But no one favors a no-deal Brexit on Friday.”With any extension under consideration, Britain would have to hold elections for the European Parliament on May 23. Mrs. May has regarded that prospect, three years after the British voted for Brexit, as absurd, but she now accepts it as the inevitable price of avoiding a no-deal Brexit and the damage that would do to her country’s economy.A central argument for a long extension is that it would relieve European leaders of the burden of constant emergency sessions on Brexit, allowing them to deal with other pressing issues, like migration, the next seven-year budget and the European elections, as well as the choice of a new president for the council, the decision-making body at which the bloc’s heads of government meet; new leaders for the commission, the bloc’s executive arm; and a new central bank head.One argument against a long extension, which France makes, is that Britain could create difficulties with a new budget and other key issues, since it would remain a member with all of a member’s rights and responsibilities. President Emmanuel Macron is seeking some form of guarantee from Mrs. May that Britain would behave responsibly.Mr. Macron has suggested quarterly “reviews” of Britain’s behavior during any long extension, which others find difficult legally. But it may be that as a compromise, diplomats suggest, the extension would run only to the end of October.The idea is to give time for Britain to sort itself out and decide what kind of future relationship it wants. But in any case, European officials emphasize, the withdrawal agreement, including the Irish backstop, designed to guarantee no hard border between Northern Ireland and Ireland, will not change.There is little expectation in Brussels that Mrs. May’s current negotiations with the opposition Labour Party will come to a positive conclusion, hence the willingness for a long extension. But whether that means the end of Mrs. May’s premiership and new elections is not Europe’s concern, the officials say.The difference now, in contrast to the last emergency council meeting last month, is that the European leaders have decided to take control over the length of any extension. What might happen at the end of it — including a no-deal Brexit, or a decision to stay in the European Union — would be up to Britain.