The defeat of the Withdrawal Agreement has heightened the prospect of a no-deal Brexit, and intensified the focus on how that will impact the Irish border.

A general election might now happen, the House of Commons might find consensus on something like a permanent customs union, but both will require a longer extension of Article 50, and that will require the UK to contest the European Elections.

For that reason a no-deal Brexit cannot be discounted in just 13 days time.

For Dublin, what that means for the border has long been the great taboo.

But at the European Council on 21 March EU leaders began asking questions – politely, but questions nonetheless – about how the border would be managed.

Member states have promised to avoid a hard border even if there’s no deal; they have also promised to uphold the integrity of the single market and customs union.

These are founded on a web of rules to ensure that any goods coming in from outside are safe for consumers, and that any duties that arise under the EU’s common external tariff are collected.

So, at any EU-third country frontier up to 63 checks and controls are potentially applicable.

They range from customs, regulatory compliance, VAT, dangerous goods, prohibited goods, live animals, food safety and agri-food checks (the so-called sanitary and phytosanitary (SPS) controls).

The backstop would ensure that none of these controls are necessary, because EU rules would continue to apply on both sides of the border.

But without the Withdrawal Agreement, there is no backstop.

So the authorities will have to somehow keep the border open and yet ensure that the appropriate controls are applied.

"Where will the controls be?" said a senior EU official in response to questions at a briefing on Monday. "The controls will have to be done where they belong. But that does not mean that we would want to see physical infrastructure at the border. We are working very closely with the Irish authorities to try and perform controls away from the border, if at all possible."

While the speaking points were cleared with Irish officials in advance, that was probably as far as the EU had gone to date in publicly stating that controls would have to happen on the island of Ireland, or, depending on the UK’s post-exit co-operation, along the Irish Sea.

In Strasbourg the EU’s chief negotiator Michel Barnier said that in the event of no deal "there will be no hard border…" but that "there are going to have to be checks carried out somewhere."

Barely had Michel Barnier spoken than Brexiteers seized on his remarks.

The campaign group Leave.eu tweeted: "Michel Barnier has confirmed that there would be no hard border in Ireland under a no-deal Brexit - destroying the case for the backstop, and destroying the case against a clean WTO Brexit. Will Remoaners apologise for their nasty Irish border fibs?!"

In the Dáil, the Taoiseach was forced to clarify that when he mentioned "special arrangements" in a no-deal situation, he was not talking about using technology at the border, but about the UK waiving tariffs on goods coming into the North, but not coming into Great Britain.

"Let there be no doubt in this House or in Westminster that when I talk about special arrangements I mean treating Northern Ireland differently from the rest of the UK. It is the UK government's proposal to do exactly that."

It is all politically tricky for the Government.

Mention the need to protect the single market and there is a clamour that this means a hard border; mention that all sides will find ways to avoid such a border, and there is a clamour that the backstop is unnecessary.

"It’s this endless ping-pong between these two messages which are neither helpful nor right," says one exasperated diplomat. "We need to continue to flesh out that middle ground so that people understand."

But the middle ground is confused. There’s an absence of hard facts as to how Ireland and the EU are going to reconcile the two imperatives.

Here is what we can piece together.

The EU has been intensifying its no-deal planning since last November. A Preparedness Group was set up under the overall direction of the Commission’s secretary-general Martin Selmayr, with deputy secretary-general Céline Gauer, a French official with 25 years experience in the Commission, in charge of outreach to member states.

On 4 and 5 February, Ms Gauer met senior officials in the Departments of the Taoiseach and Foreign Affairs. It’s understood that both sides skirted around the border issue and focused instead on no-deal preparations at Irish ports and other preparedness work.

At last week’s EU summit the border was initially raised by Hungarian Prime Minister Viktor Orban, and then picked up by the German Chancellor Angela Merkel, and to a lesser extent the French President Emmanuel Macron.

According to a senior EU official briefed on the meeting: "A number of leaders said, Leo you’ll have to tell us, if we’re going down the [no-deal] route, will you be able to cope?"

It’s understood Merkel struck a particularly sombre note. "She asked, is there a real possibility we really might be going that way?" says the official. "It might get very, very messy."

The official insists leaders were looking for reassurance and offering support, rather than pressurising the Taoiseach.

"They talked about it in very abstract terms," says the official. "Obviously the single market will have to be fully protected, etc. But they didn’t really discuss how that would be done."

But those discussions are now intensifying.

As well as the Commission’s Preparedness Group, and members of President Juncker’s cabinet, key figures from Michel Barnier’s Task Force, such as Sabine Weyand and Nina Obermaier, are in regular contact with Ireland’s Permanent Representation in Brussels and with officials in Dublin, such as the government’s chief Brexit negotiator John Callinan.

A working group of officials from the Commission’s powerful Competition division and officials from the Department of Business, Enterprise and Innovation have since the end of January been exploring the extent to which Dublin can push state aid rules to the limit to mitigate the costs of managing checks.

The Commission’s customs arm has been exploring how Ireland will meet the need to levy duty on goods coming in from Northern Ireland without having a hard border. There have been daily contacts between agriculture Commissioner Phil Hogan’s team and the Department of Agriculture, as well as contacts from the food safety division of the EU, DG SANTE.

"We’re intesifying talks with the Irish Government because 12 April is a cliff edge date," says one Commission source. "We’re in touch with them on a daily basis."

However, so sensitive are the contacts that they are restricted to small groups of officials at the highest levels.

According to one senior Brussels source familiar with the issues: "I’m certain there has been a lot of detailed work done in Dublin in very small circles, and that they do have plans. But I don’t know what those plans are."

Before getting into the detail of how checks might be applied, a number of principles are worth bearing in mind.

Senior officials say that if there is a hard Brexit on 12 April, it will be impossible both logistically and politically to bring the full gamit of EU internal market and customs union rules to bear in Ireland the next morning.

This will be a managed process driven on the one hand by politics – ie, the promise to avoid a hard border; and on the other hand by risk – ie, how far the EU is prepared to bend the rules to abide by that promise without fundamentally compromising the safety of EU consumers.

Remember, what flows over the land border from north to south is really flowing into a single market comprising 26 other member states.

"It’s really a question of how much risk we or the EU are willing to accept," says a senior Revenue figure. "It’s a political decision. That’s what it comes down to. If there’s an overriding political decision that a certain level of risk is a cost that must be borne, then that changes all the rules.

"The political decision determines the administrative practice."

However, that will not mean the EU turning a blind eye, or tolerating a wild west situation. There are countries on the periphery of the EU who will be watching with interest as to what happens on the Irish border.

"The precedent value or risk of anything like this is not to be underestimated," says the official. "The EU is an institution of rules, so precedents are something that have to be weighed up carefully."

The second principle is that so long as the politics of Westminster are live, nothing will be decided that might leach into that debate.

In other words, officials in Dublin and Brussels are extremely sensitive to the risks that any theorising on how to avoid a hard border might, as one official puts it, "pollute" the debate in Westminster.

A third principle is that while Ireland will be determined, indeed legally obliged, to uphold EU rules, they will be applied incrementally.

Officials have not discounted a scheduling sequence where rules are phased in over time. This is not surprising; if a member state is currently in breach of EU’s rules they are not immediately hauled before the European Court of Justice.

The European Commission instead goes through an iterative process of letters, reminders, and warnings. If the member state makes a commitment to become compliant then Brussels waits for them to do it. "It’s not the ideal situation but this is how it’s done in practice," says one source.

A fourth principle is that data and risk will play a major role.

In other words, Dublin and Brussels will use data to build up a comprehensive picture of what crosses the border, who are the large operators, who are the small ones, what are they transporting, where is it coming from, and where is it going to.

That data will determine what the likely risk is, and that risk will determine what the likely controls are.

"In any customs system it’s a risk based business," says one senior Irish official close to the discussions. "You base your risk on the information available to you. It’s the quality of the information you have which determines how much controlling you have to do.

"If you have really good information then a tiny amount needs to be checked, because there’s really good confidence about what’s coming in."

With all that in mind, how might things work then from 13 April if no-deal happens?

At a very senior level both in Brussels and Dublin the contours of a response will have been set so that the implementation of the plan will happen incrementally, with the technical staff – the "worker bees", as one official puts it – only getting their orders after no deal has happened.

While the Revenue Commissioners are responsible for overseeing the whole range of EU-third country checks – tariff duties, VAT, food safety and animal health, product safety, dangerous materials etc – the risk is different for each category.

On day one, for example, customs tariffs will apply. So the fiscal risk is immediate. But the risk may be different when it comes to the safety of products coming across the border.

"At this moment in time their border standards on day one will be the exact same as ours," says the Revenue source. "If the goods have got into the UK, theoretically they should have been subject to the same checks they would have faced had they come directly into the EU.

"Whether or not on day two that is still the case is a different question."

Even if tariffs are applicable on day one, the EU is aware that the volume of trade across the Irish border is small relative to the overall EU economy.

"It’s not that it can be ignored," says one source. "But there isn’t a vast amount of uncontrolled or uncontrollable trade. A lot of it is either local, or controlled by large known operators."

This differential is important. Large operators will be more familiar with third country customs compliance. Since customs declarations will have to be pre-recorded electronically that gives Revenue a data-rich environment in terms of keeping tabs on the value, tonnage, provenance and destination of the goods. On that basis they can assess the risk.

Again, the lower the risk, the less likelihood there will be checks; the fewer the checks, the more invisible the border.

But the same cannot be said for small and medium-sized operators who have proliferated due to the open border. Such operators are less likely to have experience in third country customs declarations, or in logging consignments and declarations.

"The danger zone is more in the small trader than the large trader because you’re more likely to have non-compliant goods, unsafe toys or whatever coming in white vans rather than large commercial lorries," says one source.

"I don’t think on day one all this stuff is going to come flooding across the border to pollute the single market. But incrementally it’s going to cause a problem if it’s not policed."

Another problem is that an environment with fewer controls is one with reduced costs. In other words, UK firms wanting to export into the single market might see Northern Ireland as a soft entry point in a manner that might start to distort the level of risk.

"That is not exploiting things as such," says a Revenue official. "That might be just prudent business practice, somebody entirely legitimate who sees that their costs have changed if they do things one way rather than another."

So much for using risk and data to minimise the amount of checking when it comes to customs and single market safety compliance.

The political question is, where does the checking take place?

Dublin and Brussels have pledged no hard border/no infrastructure at the border, even in the event of no deal.

Officials talk of checks "away from the border". What does this mean?

In general, this means checking either on the factory floor, or at a distribution depot, or on a supermarket shelf, or somewhere in between all these points (just not on the actual border).

Checking on the factory floor seems problematic, as it would mean Irish Revenue officers having to check goods before they leave factories or depots in Northern Ireland.

In a backstop situation, these checks would have happened in Great Britain before the goods crossed the Irish Sea (since Northern Irish goods would still be complying with single market regulations), and British customs officials would have been mandated by the EU to carry out such checks.

In the absence of a legal agreement with the UK that scenario would seem unlikely in Northern Ireland.

So the checks would have to happen somewhere else. "You can check in between at any point in the process," says one EU diplomat. "At the end point you can check by market surveillance, checking what’s actually on the shelf in the supermarket. Is it legally there? So a shopkeeper would have to show how this stuff has come in, has it paid a tariff, is it EU compliant?"

So, if customs can check consignments at points remote from the border, will this always work?

"Say I have a Hi-Ace van and I’m bringing something across from Newry to Dundalk to drop it off at a shop," says one official. "If the controls are away from the border, where on my journey between Dundalk and Newry have I been away from the border far enough so that I can be controlled? That means then a different structure that might be required. Maybe administrative, maybe documentary. I don’t know."

Officials are also looking at the somewhat misleading option of "transit".

Typically, transit refers to a consignment being shipped from one country to another, but passing through another country, or countries, in between.

To avoid checks at every entry and exit point along the way, a transit procedure is followed whereby the exporter becomes a registered "consigner" at base, and the importer becomes a registered "consignee" at the point where the goods are destined.

The principle is to ensure financially-underwritten transparency so that the goods do not illegally go off the beaten track en route.

The consigner takes out a bond from a financial institution to guarantee that the relevant customs duty, excise and VAT have been paid.

The procedure involves barcodes and scanning at either end and a secure IT system ensuring traceability. The checks and controls are ultimately "destination-based".

While it has traditionally been used for goods crossing through countries (and it will be a key post-Brexit option for Irish trucks using the UK as a landbridge to the European continent) officials are starting to look at it as a fix for consignments not transiting countries per se, but for those simply crossing the Irish border (French freight companies are also exploring the idea for consignments going to and from the UK).

"The consigner can be in Belfast and the consignee can be in Dundalk," explains Aidan Flynn, general manager of the Freight Trade Association of Ireland (FTAI). "You are registered as an authorised consigner with Revenue and customs in the North, and as an authorised consignee with Revenue and customs in the south."

The relevance in a no-deal scenario is that compliance checks only happen at the point of receipt, such as Dundalk.

However, there are several shortcomings to this option.

Flynn suggests that only the larger companies will be able to secure a bond, and that financial institutions will be reluctant to start handing out massive numbers of bonds to meet demand.

As well as the financial cost there is an administrative burden right along the supply chain. Delivery times may be held up if the point at which the consignee has the goods checked is separate to where the goods actually need to end up.

The other problem is that Revenue will need to know where the goods end up, in case a physical check is required. So the point at which the consignment crosses the border will also have to be somehow logged.

How will that be done without infrastructure? It is hardly frictionless trade.

But the biggest challenge in a no-deal scenario is not in applying customs controls. It is the controls governing food safety and animal health.

The challenge, again, is political and logistical.

At an EU-third country frontier, Border Inspection Posts (BIPs) are required to ensure that food and animals are, respectively, safe and disease-free when entering the EU.

BIPs mean infrastructure, holding pens, veterinary inspectors etc.

This is not just a problem in Ireland. EU officials confirm that in Calais, the French authorities are struggling to find enough vets and storage space for the BIPs that needed to facilitate the control of food and animal products coming in from the UK.

The prominence of a new BIPs regime along the Irish land border will depend on three things: the confidence with which the EU views the safety of food and animal products coming in, what kind of food policy the British government pursues post-Brexit, and the willingness of the UK to apply backstop-style checks on animals or animal products going from Great Britain to Northern Ireland.

On the first point, an agreement is expected shortly that the EU will permit the UK to be listed in TRACES, the EU’s system governing the pre-notification of any live animal movements (other third countries like Turkey are also listed).

"The mere fact that the UK is in TRACES does not give them a carte blanche," says one EU official. "It is helpful. It will facilitate trade in terms of ensuring that the Irish or French authorities are pre-notified of the movement. But in and of itself it doesn’t obviate the need for checks."

For the other two elements, Ireland is at the mercy of the UK’s post-Brexit policy.

"At the extreme end they could be accepting animal produce from around the world," says one Irish official. "Then we have a real problem. Or, at the other extreme they could be doing a backstop like control between Great Britain and Northern Ireland. Those are the two ends. Where things land in between will determine the risk."

Divining the UK’s attitude to the Irish border in a no-deal scenario is, according to Irish officials, perilous.

Ireland and the EU have repeatedly demanded that the UK live up to its commitments under the Good Friday Agreement to maintain an open border in a no-deal scenario. By that they essentially mean the UK will have to ultimately agree regulatory alignment on both sides of the border, in other works, a backstop 2.0.

The response so far, say Irish officials, has not been encouraging.

UK sources have constantly downplayed the idea of London agreeing regulatory alignment in the teeth of an acrimonious no-deal, and with, perhaps, a more Eurosceptic prime minister.

What Dublin describes as a "flimsy" paper entitled Avoiding a hard border in Northern Ireland in a no deal scenario was issued on 13 March, alongside the bigger publication on what tariffs the UK would drop, or impose, in a no-deal scenario.

It stated that Britain "would not introduce any new checks or controls on goods at the land border between Ireland and Northern Ireland, including no customs requirements for nearly all goods."

The paper acknowledged that Northern Irish businesses would "have concerns about the impact that this approach would have on their competitiveness," and that it would pose "challenges and risks for maintaining control of our borders, monitoring the flow of goods into the UK, and the challenge posed by organised criminals seeking to exploit any new system."

One Irish official grimly remarks: "Their paper basically says, goods from the Republic can come in to Northern Ireland tariff free, we don’t know what will happen in the other direction, we know this will bring increased crime and smuggling."

While the impact of this approach was widely reported at the time, Irish and EU officials are frank on the impact it would have on Northern Ireland’s economy.

"Essentially it would mean goods produced in the Republic," observes the official, "or entering the Republic from anywhere in the world, can move into Northern Ireland without checks, tariff free, no fees, nothing.

"It’s not only stuff coming in from Ireland, it’s coming in from anywhere. If you have tariffs on goods coming into Dover from Calais, why wouldn’t the Dutch or French send stuff into Ireland and on to Northern Ireland tariff-free?

"The potential for smuggling becomes enormous, because you’ll have Northern Ireland producers trying to make their stuff look like it’s from the Republic to avoid being tariffed out of the market."

A stark example is milk.

Each year 25% of the raw milk produced in Northern Ireland flows south for processing. From there much of it ends up in products sold around the world as EU-certified.

Typically a tanker leaving Co Cavan might collect milk from 10 farms on either side of the border, meaning that the consignment is mixed when it returns south for processing.

The tanker may have crossed the border six times during the day.

Whatever about the tariffs on milk (over 20%), under a hard Brexit, the northern product is no longer EU milk (and therefore cannot be subsumed into Irish, and therefore EU, certified butter or powdered milk for global export).

It also means that the processor would have to separate the two milks, causing havoc to the route the driver would normally take.

"It could well be the case that these supply chains just break overnight," warns one EU official. "If processors in the south find this is just too inconvenient then they might decide they’re much better off encouraging their Cavan producers to increase their production and they ditch the suppliers in Fermanagh. You could be looking at the question of the viability of dairy farms in Northern Ireland. That’s how serious this is."

That is just one brief example of how no-deal would hit Northern Ireland, and it is why groups like Manufacturing NI, the Northern Ireland Retail Consortium, the Ulster Farmers Union and the Northern Ireland Food and Drink Association have all come out in favour of the Withdrawal Agreement.

Overall, no deal poses major challenges on the island of Ireland. How Dublin and Brussels reconcile the promise of no hard border and the need to apply EU rules will be a monumental task, not least in how it’s communicated.

There will be those Brexiteers, not least the DUP, who will look at the range of approaches outlined above, and say that it proves there is no need for the backstop. This would be a fundamental misunderstanding of how the EU has approached this entire issue (and what the UK grudgingly, it seems, signed up to).

Having checks away from the border, using the transit procedure, deploying data on flows and traders to determine risk, and interpreting risk to determine controls, using technology to monitor consignment flows (even if that involves cameras, and cameras are infrastructure) are all essentially damage limitation.

It would cause a huge increase in red tape and administrative costs, and a potential explosion in middle-men agents and logistics companies.

And damage limitation would be a diminishing asset.

From day one of no-deal the EU would undoubtedly take a highly pragmatic and flexible approach. But what happens on day 20, or day 100, or day 365?

EU law – and other member states - would demand that measures are phased in and tightened over time.

The backstop, on the other hand, was designed as a holistic, legally operable, legally-binding international treaty to maintain the status quo on the Irish border and across the island in perpetuity.

It was designed to preserve the all-island economy, so that for example the milk trucks criss-crossing the border to collect milk could keep doing so into the future, and that in general cross-border trade, the knitting together of previously alienated border communities, and the 145 areas of North South cooperation provided for in the Good Friday Agreement could continue unimpeded by Brexit.

Following yesterday’s vote, this is what is now at stake.