It looks like the EU will approve British Prime Minister Theresa Mays draft Brexit deal when its 27 leaders meet with her on Sunday.
In a supportive tweet on Saturday EU Council President Donald Tusk recommended every leader should sign up to it.
But only hours previously Spain had said it wouldn't sign it off unless any future negotiations on the status of Gibraltar were decoupled from May's Brexit deal.
Then there was a breakthrough.
"Spain has reached an agreement on Gibraltar, the first thing I want to tell you is that the European Council will therefore be held tomorrow," Spanish Prime Minister Pedro Sanchez said on Saturday afternoon.
"And the second is that Europe and the United Kingdom have accepted the demands that Spain had made. Consequently Spain will lift the veto and vote tomorrow in favour of Brexit."
The status of Gibraltar is a legacy of colonial times - under pressure Spain gave it up to the British over three hundred years ago.
Gibraltarians want to be British as they've clearly shown in two referendums in the past fifty years.
But Spain hopes that, if and when Britain is no longer an EU state, the rest of the EU will back its demand to return Gibraltar to Spanish rule.
Britain's claim to rule over Gibraltar would then be weakened, the question is by how much.