If Irish history blindsided the Brexit Withdrawal Agreement, then Ireland's geography could be the next big problem.
Every year 150,000 truck crossings carry three million tonnes of freight to and from the rest of the single market across the UK land bridge from Ireland.
When both countries were in the EU this was not a problem: goods would flow from Dublin to Holyhead by ferry, then by road to Dover and then they would sail through Calais with only the bare minimum of formalities.
But Brexit has changed all that.
British freight will, from 1 January, be third country freight, meaning it will be subject to customs and regulatory controls at European ports. Neither those ports, nor British ports like Dover, are geared towards differentiating British and Irish freight.
While the Irish land border grabbed all the headlines during the Withdrawal Agreement, what would happen to those Irish trade flows crossing the UK was a less high profile issue - until now.
This week, Irish and European Commission officials reached a draft agreement on how to limit the damage when Irish food products and live animals arrive at continental ports from the UK.
The European Commission has insisted this was an uncontroversial, technical fix, but the Irish Government had to spend a significant amount of political capital in the process.
Without the agreement, Irish food exporters to Europe would have faced extra paperwork, costs and delays, at a time when our Government has been trying to increase such exports to offset the Brexit hit to the UK market.
"It would have led to a very expensive and complicated process," said one senior Irish source. "The volumes are quite large."
What to do about the UK land bridge has long been a worry for Dublin. What makes it an especially delicate issue is that Ireland will have to count on the goodwill of both London and member states to ensure that the free flow of Irish goods to the continent remains free-flowing.
Could Irish trucks get some kind of priority boarding at UK ports, and then be fast-tracked off the boat and out through the port on the EU side? If British trucks were backed up for miles because they are not in the EU, why should Irish trucks be held up as well?
As far back as April 2017, less than a year after the referendum, Irish officials had been quietly working on a form of words with the European Commission that might address the issue in as discreet a way as possible.
It wasn’t clear whether the land bridge was an issue for the divorce or the future relationship, but Dublin was anxious to plant a seed.
Last autumn, when it looked like the UK was going to crash out without a deal, background discussions intensified. As well as talking to the EU’s Brexit Task Force, Irish officials were in talks with their Belgian, Dutch and French counterparts over how Irish freight might be facilitated at their ports.
Those member states were willing to help, but the technical and legal challenges were formidable.
"The issue the Irish asked us was," recalls an official from one of the countries, "could you drop the fees for the checks? Could you minimise checks? Could you have separate lanes? But that is not the way these ports work. You can’t recreate whole port infrastructure just for that."
Some diplomats worried about the risk of violence if Irish truckers were given preferential treatment on their way into Dover.
"Just imagine there are miles and miles of queues of British, Polish trucks," recalls the official. "It would be impossible for these Irish trucks to be just driving past. Also, ferry companies don’t work like that. They operate on a first come, first served basis. You’d probably be stuck in the line like everyone else."
Because the EU and UK reached a last minute deal on the Withdrawal Agreement in October, the pressure was off. But the issue would still have to be addressed.
Irish officials were anxious that Ireland’s geographical distance should receive some kind of acknowledgement when it came to the next phase of Brexit, negotiating the future relationship between the EU and UK.
Diplomats road-tested some ideas with the European Commission. Ireland was essentially looking for derogations from EU law. Irish goods would be entering the EU from a third country, but just because a truck had an Irish licence plate that did not mean it would just get waved through at Calais.
Officials were told by the Commission that if Ireland was to be given a special mention in Michel Barnier’s negotiating mandate, the text would have to be nuanced.
"We picked up that the wording would have to be careful around the land bridge issue to ensure that it not be too explicit and sparkly," said a senior Irish source.
"It would be a basis for negotiation, while stopping short of flashing neon lights. Ireland is looking for derogations, but you could see how some countries might react."
On 25 February, the EU formally adopted the mandate for the upcoming negotiations.
While the 46-page document largely focused on the future relationship, there was a clear reminder of what the UK had signed up to in the divorce: the Irish Protocol and the promise to ensure no hard border on the island of Ireland.
However, there was a barely commented-upon extra line. Paragraph 5 of the mandate concluded: "While preserving the integrity of the Single Market, the envisaged partnership should ensure that issues arising from Ireland's unique geographic situation are addressed."
In other words, all sides should help to keep the status quo on the land bridge as much as possible. "Our partners [member states] were happy. The Commission was happy," said one Irish source.
However, there was a problem.
On 14 December, just two months after Boris Johnson had agreed the Withdrawal Agreement, a large piece of new EU legislation came into force.
With the unremarkable title of the Official Controls Regulation (OCR), it was a huge chunk of EU law several years in the making.
It effectively bundled together existing rules on the food supply chain - animal welfare, pesticide residues, animal feed, controls on products of animal origin - harmonising but also strengthening rules on how food and live animals would be monitored when entering the single market.
Because the OCR had evolved before Brexit happened, this was an unexpected complication. At a time when Ireland was hoping for flexibility on how Irish goods entered the continent via Brexit Britain, the Commission was suddenly implementing a much stricter regime when it comes to food and live animals.
"The bottom line is," said one Irish source, "the way the Commission proposed operating this Official Controls Regulation, which relates to the movement of food and animals, would have caused us very considerable difficulties on the land bridge."
There is an important distinction to be made between industrial goods on the one hand, and agrifood products on the other.
In January of this year, the UK signalled its intention to sign up to the common transit convention, an international agreement which facilitates the movement of goods through territories in order to reach their final destination.
To avoid goods having to be checked at each border, the convention provides for a bonded system by which the consignment is effectively trusted not to be opened en route.
Veterinary officials at European ports could, in theory, refuse to accept those Irish food exports rolling in from the UK. In other words, trade would no longer be free-flowing, and there would be an extra layer of bureaucracy for both exporters and hauliers.
Globally, such arrangements are facilitated by a customs system known as the New Computerised Transit System (NCTS), which allows for all the checking and controlling of what is inside those containers transiting a territory.
However, the OCR contains so-called "delegated acts" allowing the European Commission to seek further controls, the so-called sanitary and phytosanitary (SPS) controls we all learned about with the Irish backstop, when it comes to food, live animals, plants and animal feed.
"The Commission are guarded in that they want some degree of control over the goods coming back into the EU after transiting the UK," said one official, "so they’ve applied these special transiting provisions that are in the delegated act.
"That essentially means that you need to pre-notify Europe that there are goods that are eligible for SPS controls, so that with animals and animal products and germinal products, once they’re coming back into the Community, you need to pre-notify the Border Control Posts (BCPs) that these goods are coming."
That would mean that veterinary officials at European ports could, in theory, refuse to accept those Irish food exports rolling in from the UK. In other words, trade would no longer be free-flowing, and there would be an extra layer of bureaucracy for both exporters and hauliers.
The system used to keep track of animal movements and food products into and within the EU is known as TRACES. It facilitates the exchange of data between trading parties and border control authorities.
Effectively, under the Commission’s original interpretation of the new rules, Irish food exporters would have to sign up to both the NCTS and the TRACES system.
A further problem is that under TRACES, mixed consignments of goods coming into the continent would have required multiple certificates. "You’d have to have a cert for each type of animal product," says one source, "so you’d have to have a dairy cert for your butter, you’d have to have a meat cert for your meat.
"Big consignments were going to be a massive issue if we stuck to the absolute letter of the law, as described in the transit delegated act."
With Brexit having taken effect at midnight on 31 January of this year, and the transition period running out at the end of 2020, Irish officials believed that while the issue had been addressed, it still hadn’t been resolved.
The matter was serious enough for the Department of Foreign Affairs to begin raising it in capitals. Even though Ireland’s geographical position would be recognised in the EU’s negotiating mandate for the future relationship, that was more aimed at London. This was an issue about how the EU managed its own internal monitoring systems.
Dublin drew up a 22-page technical proposal, seen by RTÉ News, that was circulated among what was now being called the G5 - those countries like Belgium, the Netherlands, France and Germany, which had UK-facing ports.
The paper set out how TRACES might be replaced by an alternative IT system which would give the Commission sufficient confidence that they were aware of what was in Irish food trucks, but without the risk of having those trucks pulled over,
Ireland then brought the issue to the attention of Michel Barnier’s negotiating Task Force.
"The [Barnier] negotiating mandate is somewhat separate," says one source. "But in recent months this has become the main concern."
Irish officials used the fact that the negotiating mandate contained a reference to Ireland’s unique geographical position as leverage. "It certainly helped," says one source.
The Commission agreed to bring together the chief veterinary officers of the five countries to meet the Commission’s own senior food safety and animal health officials.
Eventually, a draft agreement was reached, based loosely on the Irish paper, with some modifications. The alternative IT system would extract pre-notification data from the NCTS customs process, allowing veterinary officials at the ports to decide if there were any concerns, and then feed those concerns directly back to the customs system.
In normal circumstances, because Ireland is a member state and complies with all EU food safety legislation, it would be unlikely a consignment would be stopped and rejected.
However, the Commission wanted to ensure that this "loop" system was not entirely automatic, so there will remain some degree of oversight. But the Commission largely accepted Irish concerns.
"Having initially been sceptical, the Commission have now come on board and it looks like it’s going to be alright," says one Irish source.
Commission officials confirm an agreement has been reached, with the caveat that it must be signed off by all 27 chief veterinary officers at a meeting next Tuesday. They insist that a similar approach is, for example, taken for goods that move between EU member states Croatia and Bulgaria via non-member state Serbia.
However, the complexity of the issue has shone a light on the overall challenges of the land bridge.
Even though Michel Barnier’s negotiating mandate acknowledges the problem for Ireland, the land bridge issue has yet to come up in the negotiations with the United Kingdom.
This is partly because the issues the land bridge gives rise to are associated with what kind of free trade agreement is struck (if at all), and we are not at that stage yet.
But Irish officials are bracing themselves for a difficult time when negotiators do get to grips with it. The UK may be in no mood to offer Irish trucks Ryanair-style priority boarding at Dover just because they are moving EU produce from one part of the single market to another.
Irish hauliers and exporters are worried about how this is going to be resolved, especially if the EU-UK future relationship talks break down in acrimony. "There's a real risk we get caught in the crossfire," says one Irish official.
"I don’t think there’s an easy solution," said one Irish official. "Why would the UK give us specific lanes for transiting Irish truck drivers?"
A report by the Irish Maritime Development Office found that the land bridge remains the quickest way to get some Irish freight to and from the continent each year, with journey times of less than 20 hours, compared to 40 hours for a direct sea route on roll-on, roll-off ferries, and 60 hours for load-on, load-off ferries.
Ireland is looking to expand its direct sea route, with ferries running from Dublin to Zeebrugge and Rotterdam, as well as additional direct sailings to France by Irish Ferries and the commencement of a Cork to Santander service by Brittany Ferries.
Indeed, 89% of the freight transiting the UK is sent by the top ten land bridge users, suggesting that if several of those companies sought alternatives, then it could have a significant impact on the UK route.
But for now the land bridge remains the premium route. Higher value goods, not to mention time sensitive products, tend to use the land bridge over other routes.
Irish hauliers and exporters are worried about how this is going to be resolved, especially if the EU-UK future relationship talks break down in acrimony. "There’s a real risk we get caught in the crossfire," says one Irish official.