On 19 February 2001, a truckload of 349 sheep made the ferry crossing from Stranraer in Scotland to Larne in Northern Ireland.

The sheep had been sold at a market in Carlisle and then separated into two groups: one received health certification, the other went straight to Lockerbie in Scotland.

Both lots were reunited there, and then made the journey to the North the following day.

What happened next sent shockwaves through Irish agriculture. It should also provide the most salutary of reminders that, when it comes to Brexit, hard borders are not at all only about customs checks and tariffs.

Some 24 hours after the sheep crossed the Irish Sea, the most devastating outbreak of Foot and Mouth Disease (FMD) in generations had been discovered at Cheale Meats in Essex.

A herd of pigs taken there from a farm in Northumberland were infected. Three days later FMD was found in a pig herd in Tyne and Wear. Another sheep herd is thought to have picked up the disease, which is airborne, before being taken to the market in Carlisle.

That was how the Irish-bound sheep waiting in Carlisle caught Foot and Mouth.

Some of the 349 sheep were dropped off at a farm in Meigh, Co Armagh. It was here that Foot and Mouth was first identified on the island of Ireland. The farm was just 2km from the border.

The proximity to the border set alarm bells ringing. The Garda National Bureau of Criminal Investigation and the British Department of Agriculture (DAFRD) established a 3km control zone and a 10km protection zone that spanned the border between Armagh and Louth. But it was too late.

On 22 March, a veterinary inspector was called to a farm in Broughattin, right at the entrance to the Cooley Peninsula. There he found mouth lesions in six out of 97 sheep. Despite a ban on the movement of susceptible animals, the disease had crossed the border; the farm was 8km south of the infected premises in Meigh.

Cars are inspected at a border checkpoint following the outbreak

The Irish frontier with the UK was sealed at the land border, at ports and at airports, using police, military and Department of Agriculture officials. Vehicles were disinfected at both the border and at ferry ports, while personnel and vehicles underwent the same treatment at sea and airports.

All imports of live susceptible species imported from the UK from 1 February 2001, including from across the border, were traced and destroyed. All susceptible animals on the infected premises were slaughtered within 24 hours. Animals within 1km of the two farms met the same fate within 36 hours.

The cull extended to all sheep and wildlife on the Cooley Peninsula, and to all cattle within the immediate surroundings of the two farms. In total, 53,000 animals were killed in the affected area.

The Foot and Mouth outbreak in 2001 is highly relevant to the current Brexit debate for a number of reasons.

Back then, Ireland and the UK were in the same European legal framework. The rapid alert systems, the cooperation between veterinary officials, the coordinated response by the relevant authorities, the ordering of animal culls in order to stop the disease in its tracks were all enabled by mutual membership of the EU.

Despite that, drastic measures still had to be taken.

Irish agriculture was devastated for a short period of time. The St Patrick’s Day celebrations were cancelled, and three Five Nations Rugby fixtures had to be moved. The country’s reputation was also damaged when it emerged that the movement of Irish sheep to France and the Netherlands also triggered FMD outbreaks there.

"It was very embarrassing," recalls one official with an intimate knowledge of the episode. "We had to put in place an immediate suspension of movements of live animals from the Republic to the rest of continental Europe."

However, Ireland was let off relatively lightly. Beyond the measures affecting the Cooley Peninsula, the movement of animals was not restricted within the Island. One reason was that the EU Commissioner in charge of animal health and food safety at the time was Irish – David Byrne.

"Fortunately for Ireland," said the official, "David Byrne was Commissioner. He took very proportionate measures, to put it mildly, which effectively meant that they put in place iron-clad measures on the Cooley Peninsula, but didn't block movements on the rest of Ireland."

Fast forward to the Brexit-era.

If there is a hard Brexit, Britain will be outside the EU’s regulatory system, meaning that the authorities will not have the luxury of relying on a harmonised system of prevention, protection, reaction and compensation should a similar outbreak occur.

In a hard Brexit scenario, the likelihood is that Britain would prioritise global trade agreements favouring cheap food. The attendent risk – according to some observers – is that Britain would relax its animal health regime to facilitate such a policy.

The EU will be vigilant in order to safeguard against a post-Brexit outbreak. And that will mean strong controls on the movement on animals from the UK and any animal movements across the Irish border.

But there is one critical fact which is often lost in the Brexit debate.

Even if Britain goes for a soft Brexit, even if the UK says it will adopt and perpetually adhere to the EU’s food safety and animal health rulebook, that does not mean there will be no checks at the Irish border.

The reality is that the UK, whether it goes for a hard or soft Brexit, will become a third country.

Any animal product coming from a third country to the EU must come from an approved third country. It will also have to come from an approved operator within that country. And it will have to be subject to controls at the point of import (meaning the Irish border).

It will also have to come with the relevant documentation.

Currently, a 500kg consignment of beef carcasses bound for, say, Dunnes Stores in Drogheda, simply drives over the land border, and delivers the meat. Yes, it will have commercial certificates and an invoice that’s presented to Dunnes Stores, but it does not require official certification, because both the Republic and the North are in the EU.

Post-Brexit, according to those who have an intimate understanding of the EU system, that truck will have to be stopped at the border. Furthermore, the slaughterhouse and the processing plant in the North will both have to have been approved by the EU.

The consignment, when it is presented at a Border Inspection Post (BIP) will have to be accompanied by a sanitary certificate signed by a British vet confirming that it meets all the EU’s requirements on how the animal is raised, on what feed it is given, and what veterinary drugs have been administered. All those will have to comply with EU rules.

The consignment will have to be inspected. Boxes will have to be opened. Occasionally, samples will need to be taken. "Apart from the regulatory requirements," says a source, "it will need infrastructure that currently isn’t there, and checks that currently aren’t being carried out. It will mean delays."

To understand the rationale behind this hard reality, we need to go back to the creation of the single market in 1992.

When the internal market for food was being realised, member states were naturally protective of their agriculture sectors, and their consumers. The only basis for them accepting the produce of other member states was that it was safe to eat. The mantra was, if you want to trade, it must be safe.

That meant a rulebook that has grown more detailed and more strict as the years and the food scandals – Foot and Mouth, BSE, dioxins – have gone by. The EU set up a food safety agency in Parma. It set up the Food and Veterinary Office in Grange, Co Meath.

There has been a push back from the agri-food and farming lobbies who complain about the bureaucracy involved. But the overriding concerns of consumers, who bear the brunt when there is a scandal, mean that big supermarkets have become as exacting about food safety as the regulators.

The reality is that if there is a screw up in one member state, it has implications for all member states.

In a Brexit situation, the potential for screw ups rises because of the sudden appearance of a large third country contiguous with the EU, one which has been the most notorious offender in animal health scandals – BSE and Foot and Mouth – even when it was a member of the EU.

"We would have to ensure that beef produced in the UK provides us with an equivalent level of food safety," says one official. "We need to be assured that the animal health system is to our satisfaction, that controls in the use of veterinary drugs meet our requirements, that the hygiene conditions in slaughterhouses meet our requirements, that the food establishments that they have created to export to the EU have to be inspected vis-a-vis our requirements."

A border checkpoint in Co Louth during the outbreak

That would mean Irish vets inspecting Northern Ireland food at the border, and, potentially, audits in Northern Irish slaughterhouses and meat processing plants by officials from the EU’s office in Grange.

This is already done in a prominent third country which exports animal products to the EU.

Vets and officials regularly travel to Brazil to audit slaughterhouses. The inspections happen at a selection of facilities, and an overall picture is extrapolated (only certain Brazilian states are permitted to export beef to the EU, and no pigmeat exports take place at all).

The Brazilian meat also has to come from animals that have been in situ, i.e not moving around, for 120 days, in order to prevent the spread of Foot and Mouth Disease. The beef has to be deboned and maturated in a particular way. The rules that Brazilian producers have to follow in order to qualify for access to the European market are adpated, updated, tightened and relaxed according to underlying conditions.

Of course, say Brexiteers, the UK could argue that on the day of Brexit their rules are still the same as the EU’s, and that the UK should enjoy what’s known as equivalence.

It is true that equivalence will most likely be sought by the UK. The EU could say, fine, we accept you are equivalent until we find out otherwise.

But the UK, according to officials with a keen knowledge of how the system works, will still be a third country. There will still need to be inspections, and there will still have to be controls at the point of import – i.e the Irish border.

The UK submission paper on Ireland for the Brexit negotiations in August points out that Switzerland enjoys the relative absence of border controls for animal health and food safety (the so-called Sanitary and Phytosanitary (SPS) rulebook), so why not the UK?

There is a simple reason for that.

Switzerland has accepted the entire SPS rulebook lock, stock and barrel. It accepts free movement of EU citizens, and it abides by the European Court of Justice. In any event, the Swiss were granted this relative ease of access at a time when it looked like Switzerland was joining the EU. It was converging with the EU legal regime, not diverging from it, which is what Brexit requires.

Switzerland is, indeed, currently negotiating some minor, incremental changes to the EU-Swiss agreement on agriculture. However, according to those familiar with the talks, the Swiss still follow the letter of the rules. The conditions are there, in other words, for Switzerland to enjoy such exceptions.

The UK may be able to enjoy similar flexibility (here and there), but here it will be faced with a fundamental choice. Britain can either strike out for food-based free trade deals with New Zealand, Australia, Canada, the US and Latin America, especially if it wants to pursue a cheap food policy; or it can bind itself to the EU orbit, sticking as closely to the EU regulatory system as possible.

But it cannot do both.

If, for example, Britain pursues a free trade agreement with the US, it will almost certainly have to swallow certain agriculture practices favoured by the US producers, such as hormone-treated beef and chlorinated chicken.

At a recent House of Commons hearing, Britain's former ambassador to the EU Sir Ivan Rogers told the Treasury Select Committee: "From my rather lengthy experience of dealing with the Americans on free trade agreements, I can tell you they will not do a free trade agreement with the British or anybody else without a major agricultural component in it.

"[The US] Congress cares more about agriculture and agricultural market access than any other issue… They will then make a set of demands in that free trade negotiation that will entail not necessarily a weakening of standards, but a divergence of standards from European standards, as their price in that deal."

If Britain, on the contrary, decides it wants to bind itself to the European sphere, they may be able to enjoy equivalence – but only if they are prepared to sign up to the strictures of the EU’s food health and animal safety regime, almost certainly up to and including European Court of Justice arbitration.

All this will have to be worked out in the negotiations on Britain’s future trade relationship with the EU.

Depending on how close the UK cleaves to the European regulatory model, there will be flexibility here and there – but not much. And if the UK announces that it is suddenly going to permit the use of hormones in beef, or the applications of veterinary drugs banned in the EU, then the UK system is no longer equivalent.

And even with equivalence there will still be inspections.

They will take place at Border Inspection Posts (BIPs).

The vast majority of EU BIPs tend to be located at customs posts. If Britain, and by extension Northern Ireland, remain outside the EU Customs Union, there will have to be customs posts on the border and at Irish ports, and the BIPs will be located adjacent to those customs posts.

The scale and nature of these inspection areas will be dictated by what they’re inspecting. Some of the 800 million litres of milk that crosses the border each year will have to be inspected. Officials will need room to take samples.

Under EU rules, some BIPs are tailored for canned, and what are known as "shelf-stable", goods. Others are set up for animal products for human consumption, live animals, products for animal feed etc (inspection facilities for live animals will require a particularly robust piece of infrastructure).

So, the reality of Britain being a third country has a price, and that price will be paid on the Irish border.

"The Brits talk about frictionless trade," says one official. "But frictionless is not the same as friction-free."

At this point we can turn to the solutions that may be found in the Brexit negotiations.

On 4 October, RTÉ News reported on an internal European Commission memo which explored the idea of an all-Ireland trade in agri-food products as a way to limit the impact of Brexit.

The memo, which came from the cabinet of the Commission president Jean-Claude Juncker, stated: "Regarding agri-food products, under EU law and in the interest of European food safety, Border Inspection Posts (BIPs) are required to ensure the food safety of all products coming from third countries."

With that in mind, the memo explored the notion of agri-food trade being carried out on an all-Ireland basis, with the presumption that Northern Ireland would somehow remain part of the EU’s regulatory system post-Brexit.

In order to ensure the integrity of that regulatory system on the island, however, BIPs would have to be moved to the Irish Sea, in other words to Larne and Belfast Port in order to monitor and certify animal and food products entering the North from Britain.

The memo was swiftly condemned by the DUP as something that would weaken the union.

It remains as a potential option in the minds of EU and Irish officials.

However, those on the Republic side with sufficiently long memories – or memories that go back to the spring of 2001 – will have reservations themselves.

The truck that carried 349 sheep from Lockerbie to Armagh was an illegal movement, and the movement across the border to the Republic was also illegal under EU rules.

At the time, as we have noted, Ireland got off fairly lightly. But, post-Brexit, there may be a different reaction, if, once again, there was an illegal movement of animals from Britain – which would be potentially outside the EU animal health framework – to Northern Ireland which led to a Foot and Mouth type crisis.

"If that were to happen again," says one official, "it’s quite feasible that member states would demand an urgent and immediate meeting of the Standing Committee on the Food Chain and Animal Health, saying we want to discuss this outbreak of Foot and Mouth disease in Northern Ireland, and secondly, we want to place restrictions on all movements of live animals and animal products from the Republic of Ireland into continental Europe."

Brexit negotiations will intensify in the next six weeks.

Britain will have to spell out how it is going to avoid a hard border in Ireland if it wants to qualify to Phase II of the negotiations, that which starts to look at trade.

Whatever solution is arrived at will require big political risks for all involved, especially the British government, reliant as it is on the support of the DUP.

The choice Britain makes will ultimately decide how hard or soft the border is. But the Irish national herd is a precious economic asset. Dublin will have to ensure that it is protected when Britain becomes a third country.

Even the most benign scenario, short of the UK reversing Brexit altogether, will require checks, certification, vets and paperwork, and those checks will have to happen somewhere – either on the Irish border or along the Irish Sea.