British Prime Minister Theresa May has been warned she faces a battle to reach a final agreement on Brexit as she prepares for a special summit of European Union leaders.
Ahead of Sunday's gathering, Spanish premier Pedro Sanchez demanded last-minute changes to the deal despite Mrs May's efforts to win him round.
The UK's Prime Minister will head to Brussels on Saturday for eve-of-summit talks with Jean-Claude Juncker knowing that she also faces an uphill task in Westminster to persuade her own MPs to back her deal.
Mrs May declared that final agreement on Brexit is "within our grasp" following a breakthrough on future relations between the UK and European Union on Thursday.
But she endured a bruising session in the House of Commons as critics lined up to condemn both the divorce deal contained in the Withdrawal Agreement and the aspirations for a close future relationship in the Political Declaration.
And, at the EU level, a major obstacle remains in the form of Madrid's continued concerns about Gibraltar, with Mr Sanchez vowing to "defend the interests of Spain".
Mrs May said she spoke to Mr Sanchez on Wednesday night and was "confident on Sunday that we'll be able to agree a deal that delivers for the whole UK family, including Gibraltar".
But in a late-night tweet on Thursday Mr Sanchez said: "After my conversation with Theresa May, our positions remain far away.
"My Government will always defend the interests of Spain. If there are no changes, we will veto Brexit."
After my conversation with Theresa May, our positions remain far away. My Government will always defend the interests of Spain. If there are no changes, we will veto Brexit.— Pedro Sánchez (@sanchezcastejon) November 22, 2018
Mr Sanchez cannot "veto Brexit" or the Withdrawal Agreement, but a refusal to co-operate will sour the atmosphere at a summit where leaders of the 27 remaining EU members were aiming for consensus.
Meanwhile the scale of the challenge Mrs May faces at Westminster was underlined in response to the latest move towards a final deal.
Former foreign secretary Boris Johnson urged her to "junk" her backstop plan for keeping the Irish border open, which he said "makes a nonsense of Brexit".
Brexit-backing ex-Cabinet minister Priti Patel branded the deal "a costly surrender by the UK Government".
Home Secretary Sajid Javid acknowledged the Government had to work harder to sell the deal to Brexiteer MPs such as Jacob Rees-Mogg, who has led a so-far ineffective campaign to oust Mrs May.
"We've all got a job to do over the coming days and weeks, to do a better job of communicating to colleagues - whether it's Jacob or anyone else - what the deal is and what it isn't, and try to listen to their concerns and see what can be done to allay some of them," Mr Javid told The House magazine.
Mrs May was also left in little doubt that she will not be able to count on the votes of the 10 DUP MPs.
"The Government needs to recognise that there is no enthusiasm for the withdrawal agreement across all sides of the House of Commons," the party's Brexit spokesman Sammy Wilson said, adding it was "time to work for a better deal".
Labour leader Jeremy Corbyn told the Commons that Mrs May had returned from Brussels with "26 pages of waffle".
Shadow Brexit secretary Sir Keir Starmer indicated Labour would vote down Mrs May's deal but could back a compromise involving a permanent customs union - something she has rejected.
Asked what would be required to secure Labour support, Sir Keir told BBC's Newsnight: "A comprehensive, permanent customs union that protects manufacturing and gives us a say in trade policy with the EU. "
He said Mrs May had repeatedly ruled out such an approach but "if she reflects between now and the vote we will look at what she brings back" however the customs concession "wouldn't be the only thing" sought by Labour.
The Prime Minister said the joint UK/EU declaration on the future relationship is "the right plan for the UK".
The text calls for an "ambitious, broad, deep and flexible partnership" between the EU and the UK in areas like trade, security and defence, possibly in the form of a Ukraine-style Association Agreement.
It confirms the UK's right to develop an independent trade policy and end the free movement of EU nationals and leaves open the possibility of using technological solutions to keep the Irish border open after Brexit.
But elements which infuriated Brexiteers included:
- Plans for a "free trade area, combining deep regulatory and customs co-operation", building and improving on the "single customs territory" provided for in the withdrawal agreement;
- Provisions to ensure a "level playing field" on business competition, which could cover areas including state aid, workplace and environmental protections, climate change laws and tax;
- A role for the European Court of Justice in providing "binding" rulings on the interpretation of EU law in any disputes between the two sides.
Aides said that Mrs May received "strong support" from Cabinet ministers in a conference before addressing the Commons.
Downing Street has always stressed that the 585-page legally binding Withdrawal Agreement setting out the terms of the UK's departure from the EU - including a "divorce bill" estimated at £39bn - can only be finalised alongside the shorter declaration setting out the two sides' aspirations for their future relations.