The EU as a whole has jurisdiction over external customs issues and free movement in and out of the trading bloc, rather than individual EU countries, said Guy Lougher of Pinsent Masons, the law firm behind Out-Law.com. The UK and Ireland would not be able to agree to a relaxation of customs and immigration controls between themselves, he said.

The recent political upheaval in Northern Ireland which, last week, led to the collapse of the devolved administration could potentially leave the country without sufficient representation during the negotiations if not resolved, Lougher added.

In a highly anticipated speech in which she set out the UK government’s current thinking on Brexit, the prime minister said that maintaining the common travel area would be “an important priority for the UK in the talks ahead”.

“Our guiding principle must be to ensure that as we leave the European Union, no new barriers to living or doing business within our own union are created,” she said.

Lougher said that although it would “in principle” be possible for the EU and UK to agree to waiving border controls between Northern Ireland and the Republic of Ireland, “negotiations with the EU over the terms of the UK’s exit and the shape of its future trading relationship with the EU will take the form of an immense exercise in horse-trading”.

“This means balancing the parties’ respective positions on a range of issues; from free movement of persons, to agriculture and fisheries, to access to the EU market for UK financial services and cars,” he said. “In these complicated negotiations, real efforts will need to be taken by a range of interested parties to ensure attention is paid to the specific circumstances and needs of Northern Ireland and its interactions with the Republic.”

“If recent political developments leave Northern Ireland without a devolved administration during this crucial period, the task of making its voice heard amid a cacophony of competing interests is certainly more difficult,” he said.

This week the UK government’s Northern Ireland secretary, James Brokenshire, set a date of 2 March 2017 for new elections to the Northern Ireland Assembly. Deputy first minister Martin McGuinness of Sinn Fein stepped down last week in protest over the rival DUP’s handling of a renewable energy scheme. The power-sharing agreement between the two parties, drawn up as part of the Good Friday Agreement, collapsed when Sinn Fein did not nominate a replacement within a statutory seven-day period.

The current Assembly will be dissolved on 26 January, meaning that its last sitting day will be 25 January. Although ministers will remain in post during the intervening period, they will not be able to take any decisions requiring executive approval.

Once the March election takes place, the two leading parties will have three weeks in which to form a new partnership government.