London:  The British government and the main opposition were to hold further crisis talks on Thursday after MPs voted in favour of a Brexit delay that would avoid Britain crashing out of the EU on April 12.

With options running out, May switched course and invited Labour leader Jeremy Corbyn for talks on Wednesday in a bid to forge a compromise that avoids a chaotic "no-deal" departure from the European Union in eight days' time.

Negotiating teams for both sides were to meet again on Thursday for a full day of urgent discussions.

May's divorce deal with the other 27 EU nations has been rejected three times by parliament and patience is wearing thin in Brussels as the deadline to end Britain's 46-year membership nears with no agreement in sight.

The premier said Tuesday she would seek another "short" Brexit extension at an EU leaders' summit in Brussels on April 10.

In a rushed parliamentary bid to avoid Britain leaving the EU without a divorce deal next Friday, MPs voted by the narrowest of margins late Wednesday in favour of draft legislation that would force the government to seek to delay Brexit beyond April 12.

The vote passed by just one -- 313 votes in favour and 312 against -- in the lower House of Commons and the bill will now pass to the upper House of Lords for final approval on Thursday, much to the government's annoyance.

"We are disappointed that MPs have chosen to back this bill," a government spokesman said.

"The prime minister has already set out a clear process through which we can leave the European Union with a deal and we have already committed to seeking a further extension.

"If passed, this bill would place a severe constraint on the government's ability to negotiate an extension and reflect this new date in UK statute books before April 12."

May said Wednesday's talks with Corbyn were "constructive", suggesting she might be prepared to bend her previous principles and listen to proposals for much closer post-Brexit trade relations with the bloc than many Conservatives are prepared to accept.

Both sides showed "flexibility and a commitment to bring the current Brexit uncertainty to a close", said a spokesman for May's Downing Street office.

"We have agreed a programme of work to ensure we deliver for the British people, protecting jobs and security," he added.

Corbyn said: "There hasn't been as much change as I expected but we will have further discussions... to explore technical issues" on Thursday.

He told May that Labour wanted a customs union with the EU, access to its single market and raised "the option of a public vote to prevent crashing out or leaving on a bad deal".

If the talks between the government and Labour fail to reach a compromise that both can support, May hopes the two sides can come up with mutually acceptable options that would be put up for binding parliamentary votes.

The British premier's sudden change of tack was received with caution by EU leaders who wish to see the split resolved before the European Parliament elections begin on May 23.

Finance minister Philip Hammond said it was an "expectation" that Brussels would offer a longer extension at the April 10 summit than the short one Britain is targeting, but London would want to curtail it as quickly as possible after passing a Brexit deal.

"It would be in everybody's interest that we moved into the implementation period at that point," he told ITV television.

German Chancellor Angela Merkel was to visit Dublin on Thursday to meet Irish Prime Minister Leo Varadkar for talks on Brexit. She has vowed to "fight until the last hour" to avoid a no-deal outcome -- something that would hit the UK's only land neighbour Ireland hardest.