Britain and the European Union have finally struck a new Brexit deal after days of intense back-and-forth negotiations, setting the stage for another major parliamentary showdown over the United Kingdom’s bid to leave the bloc after months of political chaos.

Jean-Claude Juncker, the president of the European Commission, announced the agreement on Thursday just hours before EU leaders were due to meet in Brussels, whom he called on to back the deal.

“Where there is a will, there is a deal – we have one! It’s a fair and balanced agreement for the EU and the UK and it is testament to our commitment to find solutions,” Juncker said in a post on Twitter.

191017102131992

The new agreement – which sets out a revised plan for Northern Ireland, a major stumbling block in the previous deal – must still be formally approved by all of the EU’s member states and ratified by the European and UK Parliaments.

It comes just two weeks before the United Kingdom is scheduled to depart the 28-member bloc on October 31.

British Prime Minister Boris Johnson praised the last-minute breakthrough.

“We’ve got a great new deal that takes back control – now Parliament should get Brexit done on Saturday so we can move on to other priorities like the cost of living, the NHS, violent crime and our environment #GetBrexitDone #TakeBackControl,” Johnson said in a post on Twitter.

We’ve got a great new deal that takes back control — now Parliament should get Brexit done on Saturday so we can move on to other priorities like the cost of living, the NHS, violent crime and our environment #GetBrexitDone #TakeBackControl — Boris Johnson (@BorisJohnson) October 17, 2019

Looming parliamentary showdown

Johnson’s plan will now be put to British legislators, who are set to vote on the agreement during a special sitting of the House of Commons on Saturday.

The UK Parliament has already rejected a prior Brexit deal – negotiated by Johnson’s predecessor Theresa May – three times.

191011064629970

Opposition to May’s plan centred on the deal’s controversial “backstop” clause, a safety net provision which sought to guarantee no return to a hard border on the island of Ireland in the event that post-Brexit trade negotiations between the UK and the EU proved unsuccessful.

The clause set out that the whole of the UK, including Northern Ireland, would remain in a customs union with the EU “unless and until” the bloc agreed there was no prospect of a return to a hard border.

Johnson’s push for revised withdrawal terms has hinged on getting rid of that clause, which critics feared could tie Britain into the EU’s orbit indefinitely.

His new deal proposes instead that Northern Ireland will remain in the UK customs area but tariffs will apply on goods crossing from mainland Britain to the territory if they are deemed to be headed further, to Ireland and the bloc’s single market.

By removing the backstop, the British leader hoped to secure the support of eurosceptics in his own party and Northern Ireland’s Democratic Unionist Party (DUP), which has helped prop up the minority Conservative government since the UK’s 2017 general election.

But the recently-installed prime minister is expected to face an uphill battle to get his revised withdrawal agreement signed off on, with several parties saying on Thursday they would not back the deal.

191017113549363

The DUP, for its part, said it could not support what was being proposed in Johnson’s deal regarding customs and consent issues for Northern Ireland’s border with Ireland post-Brexit.

Jeremy Corbyn, the leader of Britain’s main opposition Labour party, meanwhile called on legislators to reject the deal delivered by Johnson.

“From what we know, it seems the prime minister has negotiated an even worse deal than Theresa May’s,” Corbyn said.

“This sell-out deal won’t bring the country together and should be rejected. The best way to get Brexit sorted is to give the people the final say in a public vote,” he added.

From what we know, Johnson's negotiated a worse deal than Theresa May. This sell-out deal risks our rights, protections and NHS. It won’t bring the country together and should be rejected. pic.twitter.com/ZMKSNt2Nc9 — Jeremy Corbyn (@jeremycorbyn) October 17, 2019

Al Jazeera’s Rory Challands, reporting from London, said the situation was “sounding and looking very familiar” ahead of the weekend’s vote.

“Theresa May got a deal with the EU, brought it back, and it went down like a lead balloon in parliament time and time again,” Challands said.

“Now, Boris Johnson has come back with a deal and the signs are already looking worrying for him,” he added.

Johnson has said he would rather be “dead in a ditch” than delay Brexit past the end of this month.

However, under a law passed by the UK Parliament in September he will be required to request an extension from the EU on Saturday if MPs have not by then agreed to a divorce deal or signed off on departing the bloc with no deal.

The dizzying political drama of recent months has unfolded more than three years after nearly 52 percent of voters opted in favour of leaving the EU during a June 2016 referendum. Turnout for the poll was more than 72 percent.