BRUSSELS/DUBLIN (Reuters) - The United Kingdom and Ireland could reach agreement in hours on how to run their post-Brexit Irish land border, paving the way for a deal that would remove the last obstacle to opening free-trade talks with the European Union.

Britain's Prime Minister Theresa May and European Commission President Jean-Claude Juncker leave after making statements at the European Commission in Brussels, Belgium, December 4, 2017. REUTERS/Yves Herman

A carefully choreographed attempt to showcase the progress of Brexit talks collapsed at the last minute on Dec. 4 when the Northern Irish party which props up Prime Minister Theresa May’s government vetoed a draft deal already agreed with Ireland.

Since then, May has been scrambling to clinch a deal on the new UK-EU land border in Ireland that is acceptable to the European Union, Dublin, her own lawmakers and Northern Ireland’s Democratic Unionist Party, which keeps her government in power.

May and European Commission President Jean-Claude Juncker could meet early on Friday to seal a border deal, the European Commission’s chief spokesman said.

“We are making progress but not yet fully there,” Commission spokesman Margaritis Schinas said. “Talks are continuing throughout the night. Early morning meeting possible.”

A spokesman for PM May said Brexit discussions were ongoing while a senior Irish official said talks were moving swiftly and that a deal was possible in hours.

“It is moving quite quickly at the moment,” the Irish official told a British Irish Chamber of Commerce event in Brussels. “I think we are going to work over the next couple of hours with the UK government to close this off. I say hours because I think we are very close.”

Later on Thursday, the political editor of the BBC said the leadership of the DUP in Belfast had not signed off on the border deal, meaning it could yet stumble, but May continued to plan to meet Juncker and European Council President Donald Tusk early on Friday in Brussels to finalise the agreement.

The political editor of Sky News, quoting a DUP source, said the party would continue to work on the border issue on Friday.

Moving to talks about trade and a Brexit transition are crucial for the future of May’s premiership, and to keep trade flowing between the world’s biggest trading bloc and its sixth largest national economy after Britain leaves on March 29, 2019.

But the EU will only move to trade talks if there is enough progress on three key issues: the money Britain must pay to the EU; rights for EU citizens in Britain and British citizens in the EU; and how to avoid a hard border with Ireland.

BREXIT DEAL?

As speculation swirled about whether London, Dublin and Brussels were about to clinch a border deal, European Council President Donald Tusk’s office said he would brief reporters at 0650 GMT on Friday before departing for Hungary.

The EU says May has an effective deadline of Sunday night if she wants to seal a deal and hope to have agreement on trade talks in time for the EU summit on Dec. 14-15.

All sides say they want to avoid a return to a hard border between EU member Ireland and the British-ruled province of Northern Ireland, which might upset the peace established after decades of violence.

The Democratic Unionist Party (DUP) insists that Northern Ireland, as part of the United Kingdom, must leave the EU in the same way as the rest of the United Kingdom.

To clinch a deal, though, May must ensure she has the support of the DUP, whose leader told her bluntly on Monday that it would not support her minority government’s legislation unless the Irish border draft deal was changed.

She must also convince her divided Conservative Party that the deal she makes is acceptable.

British Foreign Secretary Boris Johnson, a leader of the Brexit campaign, insisted the whole of the United Kingdom must “take back control” when it left the EU.

“Whatever way we devise for getting onto the body of the (Brexit) talks, it’s got to be consistent with the whole of the United Kingdom taking back control of our laws, of our borders and of our cash,” Johnson told reporters.