Britain's Prime Minister Theresa May. Picture: Kirsty Wigglesworth/AP/African News Agency (ANA)

Brussels - An 11th-hour deal on Saturday to answer Spanish demands for a big say on Gibraltar after Britain leaves the EU has salvaged an EU summit which will now go ahead as planned on Sunday to deliver a Brexit accord.

With British Prime Minister Theresa May due to meet EU chief executive Jean-Claude Juncker and summit chair Donald Tusk at 6 p.m. (1700 GMT) and 7:15 p.m. respectively, Tusk secured a deal with Spanish Prime Minister Pedro Sanchez, who had been threatening to scupper the consensus by staying away on Sunday.

"After the phone call between (Tusk) and (Sanchez) a few minutes ago, we are closer to tomorrow's (European Council)," Tusk's spokesman Preben Aamann said on Twitter.

The British government released a letter from the British ambassador to the EU Tim Barrow to the head of Tusk's secretariat spelling out that Britain would make no presumption that any future EU-UK trade pact would apply to Gibraltar.

Sanchez was due to make a statement in Madrid at 3 p.m. (1400 GMT) to outline the agreement, diplomats said, after British and Spanish negotiators talked through the night with EU officials trying to broker a deal that would reassure Madrid on how the Brexit treaties would apply to Gibraltar and give it a clear say on their application -- without reopening the texts.

Those assurances should form part of a brief statement agreed by the 27 EU leaders and added to the minutes of Sunday morning's hour-long meeting before the 27 meet May at 11 a.m.

"Negotiations went on through the night with Spain and Britain," one diplomatic source said. "In a telephone conversation just now, Tusk and Sanchez reached an agreement on Gibraltar. The summit will go ahead."

Many Brussels insiders view Sanchez's gambit as summit grandstanding for domestic purposes -- he faces a regional election next weekend in Andalusia, the province to which Spaniards argue Britain's 300-year-old naval base and 30,000 citizens on the rock of Gibraltar rightly belong.

The biggest obstacle to the Brexit accord overall is the vehement opposition in the British parliament. Without its approval, Britain could leave the bloc on March 29 without an agreement to mitigate economic and legal disruption.

Reuters