LONDON — Talk about cutting it close. In just 17 days, or a little over 400 hours, the U.K. is due to leave the European Union.

British lawmakers will decide Tuesday whether they will support the deal that Prime Minister Theresa May spent nearly two years negotiating with the E.U.

Or they could reject the withdrawal agreement for the second time, setting in motion an uncertain chain of events that could have any number of endings.

In January, May suffered the biggest parliamentary defeat of any British prime minister in history as lawmakers of all stripes crushed her plan to leave the European Union. More than one-third of lawmakers from May's ruling Conservative Party voted against her proposal. Just 202 lawmakers supported her plan, with 432 voting against it.

The main sticking point for many lawmakers is what’s known as the Irish backstop — an insurance policy to avoid border checks between Northern Ireland, which is part of the U.K., and the Republic of Ireland, which is in the E.U.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Hardline Brexit supporters fear that the backstop could trap their country in E.U. trading rules forever and have insisted on a time limit or an exit mechanism.

For 30 years, starting in the late 1960s, the border was a front line in a conflict known as "The Troubles" that killed 3,600 people. Some fear Britain’s plan to leave the E.U. could result in checkpoints being reintroduced there, reopening old wounds and potentially spurring new violence.

May made a last-minute dash on Monday evening to Strasbourg, France, where the European Parliament sits, to agree further tweaks to the backstop in the hopes that it would push reluctant lawmakers to vote for the deal.

“MPs were clear that legal changes were needed to the backstop. Today we have secured legal changes,” she said at a press conference Monday night with the head of the European Commission, Jean-Claude Juncker.

After two-and-a-half years of negotiations since the 2016 Brexit referendum, Europe's frustration with the U.K.’s own political drama was clear.

“The E.U. has spared no energy, time or commitment to clarify, reassure or explain what the withdrawal agreement is or is not. We have left no stone unturned,” Juncker said. "It is this deal or Brexit might not happen at all. Members of the House of Commons have a deep responsibility and a fundamental choice to make.”

As Brexiteers tuck into their porridge this morning, they have a very difficult decision to make. I hope they wont mind some frank advice from one who is a colleague to all and a friend to some. Do yourselves a favour. Take the win. Vote for the deal. — Nick Boles MP (@NickBoles) March 12, 2019

The question now is whether the further reassurances on the backstop will be enough to convince Brexit-supporting members of May's party to vote for the deal. If it does fall for the second time, May has promised two further votes: the first on whether the U.K. should leave the E.U. without any agreement on the future relationship, and the second on a delay in the date of Britain’s departure.

Leaving the E.U. without a deal would be disastrous for the U.K. economy and could stymie trade between Britain and its closest neighbors. Supermarkets have warned there may be shortages of fresh produce, businesses are stockpiling goods, and the government is stockpiling medicines.

With just hours to go before the vote on the deal, political experts struggled to predict how it would end.

Some have suggested that if the deal failed to pass by a smaller margin than last time, May could even bring it back for a third vote.

Other more centrist lawmakers in the ruling Conservative Party have said that if the deal fails they will team up with opposition lawmakers to arrange a closer trading relationship with the E.U. than May envisions.