LONDON — Top officials of the European Union tossed Prime Minister Theresa May a lifeline on Wednesday, saying they would allow Britain to push back its departure date from the bloc, but only if Parliament endorsed her withdrawal plan.

Lawmakers have twice already rejected Mrs. May’s plan emphatically, but in the unlikely event they changed their minds, Britain would still need an extension. The March 29 deadline is so near, there is no way lawmakers can pass the supporting legislation needed to put any withdrawal plan into effect.

In offering an extension but tying it to a vote in Parliament, the European Union officials appeared to be trying to strengthen Mrs. May’s position and pressure British lawmakers to fall into line behind her plan, which would allow Britain to exit the bloc but maintain its trade ties until at least the end of 2020.

If they don’t, the alternative may be an outcome many of the lawmakers like even less than the prime minister’s plan: a break from the bloc with no provisions for cushioning its economic impact — a so-called no-deal Brexit — or an even lengthier delay. And that could potentially mean no withdrawal from the bloc at all.