German Chancellor Angela Merkel said a deal on Britain’s exit from the EU was still possible as EU leaders headed to Brussels on Thursday for a two-day summit dominated by last-gasp negotiations.

The meeting will be Boris Johnson’s first and last EU summit as prime minister of Britain if he can seal an agreement with the other 27 member states to leave the EU on Oct. 31 — and get his Parliament’s approval at a special session on Saturday.

Johnson spoke with the head of the European Union executive, Commission President Jean-Claude Juncker, and a Commission spokesman said it still wanted a deal.

Merkel told the German parliament: “There has been movement in recent days, significant movement … so we are on a better path than before but, today I must say very clearly, we have not reached the goal yet.”

At the same time, Johnson is struggling to win the parliamentary backing he needs from politicians dismayed by concessions made over how to treat the border between EU member Ireland and the British province of Northern Ireland.

Northern Ireland’s Democratic Unionist Party, which supports Johnson’s government, said on Thursday it would not accept what was being suggested, causing the British pound to skid.

And a leading British pro-Brexit lawmaker, Bernard Jenkin, said the EU did not really want a deal.

Johnson has promised to take Britain out of the EU on Oct. 31 come what may, despite a law that requires him to request an extension if no deal is done and approved by parliament by Saturday.

Officials in Brussels said almost all the differences between the world’s fifth-largest economy and its biggest trading bloc over their split had been resolved after marathon talks that extended into the early hours of Thursday.

But a U.K. government source said the system of levying value-added tax remained an outstanding issue.

EU leaders will need the text of any agreement to allow them to give some form of approval.

Merkel said she could not say how the summit would end.

Prime Minister Boris Johnson has struggled to win support in Britain’s Parliament. (Ben Stansall/AFP/Getty Images)

However, Belgian Prime Minister Charles Michel, who will chair summits when he takes over as European Council president in December, expressed cautious optimism.

“The information I have, which is very recent, from the last hours, make me think that there will be a deal tomorrow. We know that the last centimetres, the last millimetre are always the most difficult,” he told the Belgian news broadcaster LN24.

The leaders will also contend at the summit with other challenges facing the EU, which has been torn in recent years by euroscepticism and economic disparities.

They will discuss the crisis in Syria touched off by Turkey’s incursion against U.S.-allied Kurdish forces. The bloc this week agreed to limit arms exports to Turkey over its offensive, but stopped short of a bloc-wide embargo against a NATO ally.

“This is a deep, durable and multi-faceted crisis,” said one senior EU diplomat, adding that EU member states were seriously concerned that the crisis would lead to Islamic State militants coming to Europe.

Tensions over EU enlargement

Differences over plans for the EU’s first enlargement since 2013 will be exposed at the summit, with France insisting that Albania and North Macedonia are not ready for membership talks.

Paris says the EU’s challenges — including Brexit, the emergence of China as a strategic rival and security threats posed by Russia — are already too extensive to admit two more states from a region still scarred by the legacy of 1990s wars and struggling with crime and corruption.

“It’s a very difficult and political debate,” said a second senior EU diplomat, describing it as an effort to find a balance between helping to stabilize the Balkans and putting the functioning of the bloc itself at risk.

Another key issue will be the EU’s budget for 2021-2027, the Multiannual Financial Framework (MFF), and how to cover the shortfall when Britain leaves.

Member states have yet to agree how much individual countries should contribute, a question made all the more difficult by proposals to end a system of rebates.

“It’s not a discussion that will end in consensus, but the first time that they will enter into the numbers game,” said a third senior EU diplomat. “The positions are clear, but obviously there is division.”

The summit will also be a chance to find common ground on climate targets ahead of a UN summit in Chile in December.

There is broad, though not unanimous, support for the EU to achieve net-zero emissions by 2050, but there are differences among members over how much progress should be made by 2030.