If Brexit is a divorce, then Northern Ireland is a child at the centre of a messy custody fight. The new Brexit deal seeks to solve the Irish border problem through joint custody.
Whether Northern Ireland is in the EU or the UK will differ depending upon who is asking and why they want to know.
This fudge allows both sides to claim victory, but like all custody arrangements it brings with it a new set of rules and restrictions that were not needed during the marriage.
For Northern Ireland these rules will govern not who pays for holidays and where it spends Christmas, but its economic regulation and how it trades with both the Republic of Ireland and the rest of the UK.
Companies in Northern Ireland that import goods from the rest of the UK will be charged the EU tariff rate on their imports.
They will then receive a tariff refund if they can prove that Northern Ireland is the imported goods’ final destination.
Commentators have been quick to point out that this system not only poses huge administrative difficulties, but guarantees lots of new red tape for Northern Irish businesses.
After all, Northern Ireland currently imports twice as much from Britain as it does from the rest of the world, including the republic.
Less attention has been paid to another consequence of the deal.
If the UK and the EU reach a free trade agreement, then exports from Britain to Northern Ireland will be subject to rules of origin requirements.
This means British traders will need to prove that their goods are UK-made in order to send them to Northern Ireland duty free.
To understand why there will be rules of origin in the Irish Sea, consider the example of cars.
The EU charges a 10 per cent tariff on car imports from countries, such as the US, that it does not have a free trade agreement with.
But suppose that after Brexit the UK signs free trade agreements that abolish car tariffs with both the EU and US.
A clever exporter in the US could try to get round the EU’s car tariff by sending its cars first to Britain tariff-free under the UK-US FTA, and then from Britain to Northern Ireland tariff-free under the UK-EU FTA.
Once the cars arrived in Northern Ireland they would be free to circulate throughout the EU without facing further restrictions.
The risk of firms sending goods via a third country to avoid tariffs is why rules of origin exist.
Usually, they only apply at international borders but the peculiarities of the proposed Brexit deal mean it will lead to rules of origin on trade within the UK.
And what holds for cars, also goes for all other goods.
So why does it matter if there are rules of origin in the Irish Sea? Two points stand out.
First, it means that even under a UK-EU free trade agreement, there will be a customs border between Northern Ireland and the rest of the UK.
This is a crucial difference between the new deal and Theresa May’s plan for the UK and EU to remain in a single customs territory.
Not only does the new deal create a border within the UK, but the division will be permanent.
Second, companies in the rest of the UK that do business with Northern Ireland will be subject to the burden of complying with rules of origin even if they do not trade internationally.
It is not easy to define when a good is UK-made.
Simply repainting a car that was produced in the US is not enough to qualify.
Trade agreements often require that some share, 50 per cent, say, of a good’s value is produced in the UK.
The problem is that for a company to determine whether it meets this threshold, it not only needs to know where its inputs come from, but also where its suppliers source their inputs and where its suppliers’ suppliers get their inputs from, and so on.
Most do not have this information, meaning they will face an unwelcome choice.
Waste money collecting the data needed to satisfy rules of origin. Or stop exporting to Northern Ireland.
Neither option is attractive.
Although hastily drawn up, the terms of the UK’s divorce from the EU will have long-lasting effects.
Rules of origin on trade within the UK are just one example of what the future may hold, but they illustrate a broader point.
Sharing custody of Northern Ireland with the EU will have economic, as well as political, consequences.
And those consequences will be felt on both sides of the Irish Sea.