Spanish Prime Minister Pedro Sanchez had threatened to boycott the summit, but announced on Saturday that a compromise had been reached over future trading relationships involving Gibraltar, a British overseas territory on Spain's southern coast.
British Prime Minister Theresa May insisted her position on Gibraltar had not changed, but Sanchez argued that he had secured a win and she was sharply criticized by Brexiteers in the UK.
In an invitation letter to EU leaders on Saturday, European Council President Donald Tusk said he would recommend that they back the agreements struck "although no one will have reasons to be happy."
The bigger tests for May lie ahead, however. On Sunday, she began a two-week PR blitz aimed at swaying enough MPs to pass her deal in the UK parliament in December.
In an open letter to the British public, May wrote that she would campaign "heart and soul" to get her Brexit deal through parliament.
However, the reaction to the compromise struck with Spain over Gibraltar was a sign of the continuing opposition from within her own Conservative Party. Former minister Owen Paterson described the agreement as "utterly shameful."
Former foreign secretary Boris Johnson also made headlines on Saturday with a speech to the Democratic Unionist Party (DUP) conference in which he claimed Britain would become a "satellite state" under May's Brexit deal and warned the country was on the verge of "a historic mistake."
The parliamentary math for passing the deal is stacked against the prime minister.
The DUP, which struck a deal to support the Conservatives on key votes after May lost her party's majority in a 2017 election, is threatening to oppose the deal. Opposition parties and over 50 Conservative MPs have also said they will vote against.
Former Brexit secretary David Davis argued on Saturday that the deal had “a near-zero chance of getting through the House of Commons,” saying that the only options were a “new deal or no deal.”
Unless something changes dramatically, the prime minister would lose a vote in parliament.
Several alternative options are thought to be under discussion – from further negotiations and an extended transition period to a new referendum – but Downing Street is reported to be focusing on a two-vote strategy.
The Times newspaper claimed the government hoped the shock to financial markets caused by a first vote defeat in parliament would persuade opponents to back the deal, possibly with minor tweaks, the second time around.