Having survived a challenge from hardline anti-Europeans in her own party, Theresa May comes to Brussels on Wednesday to fine tune the terms of the Brexit divorce.
The British prime minister will enjoy afternoon tea with the president of the EU commission, Jean-Claude Juncker, with negotiations set to continue right up to Sunday's planned deal-signing summit.
Neither side has much wiggle room left to polish the withdrawal treaty nor the political declaration on future relations that goes alongside it, but May must show that she has left nothing on the table if she is to convince British MPs to ratify the deal.
And she now appears to have bought herself time to focus on negotiations in Brussels, after a leadership challenge from anti-European members of her own party fizzled out, at least temporarily, without a confidence vote.
- 1 Post-Brexit UK announces largest military spending since Cold War
- 2 UK and EU making some progress on post-Brexit trade deal
- 3 UK PM Johnson's Brexit 'brain' Cummings to resign by year end
- 4 Why long-distance races world records have been falling
She nevertheless still faces pressure from her Northern Irish parliamentary allies, who oppose a deal they say weakens British sovereignty in their province, and from Spain, which warned it might veto the accord over the issue of Gibraltar.
European Union leaders will meet on Sunday to approve both the outline declaration on future post-Brexit ties and the withdrawal agreement struck last week, hoping finally to put an end to the uncertainty over Britain's exit in March.
But political challenges remain on both sides of the Channel.
Two of May's top ministers quit last week over the divorce deal, including her Brexit secretary, while MPs from all parties came out against it.
A leadership challenge by May's own Conservative MPs failed to materialise, however, and when she gathered her new-look cabinet Tuesday they agreed to press on.
The withdrawal deal covers Britain's financial settlement, expatriate citizens' rights, contingency plans to keep open the Irish border and the terms of a post-Brexit transition.
Officials are now racing to agree details of the accompanying outline statement on the future trading and security relationship for after Britain leaves the EU's single market and customs union.
European ministers have signed off on the draft divorce terms, but the agreement now risks being derailed by opposition in Madrid.
Prime Minister Pedro Sanchez of Spain, which has a long-standing claim on the British territory of Gibraltar, warned he would "vote no to Brexit unless there are changes" to guarantee Madrid a say in future relations between it and the EU.
Spain wants the right to negotiate the future of Gibraltar with Britain on a bilateral basis.
- 'Show our displeasure' –
Opposition to the agreement is also building in the House of Commons in London, which will vote on the final Brexit deal, probably early next month.
On Monday MPs from Northern Ireland's Democratic Unionist Party (DUP) abstained on three budget votes in the Commons and voted against the government on a fourth, in apparent defiance of their deal to back the Conservatives on finance matters.
Pro-Brexit Conservatives have also savaged the divorce deal, which they say keeps Britain too close to the EU.
Rebels led by MP Jacob Rees-Mogg failed in their attempt to force an immediate confidence vote in May's leadership, but warned they would keep trying.
He said May had taken "a deliberate decision not to deliver a proper Brexit".
Their opposition raises the risk of the deal failing and Britain ending its four-decade membership of the EU with no other arrangement in place.
- Bank of England backing -
Despite the opposition, May has continued to defend her deal in meetings with politicians, business leaders and party members.
The withdrawal agreement sets out plans for a 21-month transition after Brexit, in which Britain and the EU want to turn their outline agreement on the future relationship into a full trade deal.
But controversially, it says that if that deal is not agreed in time, Britain will adopt a "backstop" arrangement to keep open its land border with Ireland.
This would keep all of Britain in the EU's customs union, and Northern Ireland also in parts of the single market.