IT IS said of Gladstone that he spent his declining years trying to understand the answer to the Irish question – only for the Irish to change the question when he thought he had the answer.

That was in the late 1800s and Theresa May must this week be feeling as Gladstone did, having seen an expected Brexit deal slip away. Something will be done to fudge this to save faces all round. But what happened confirms that while Brexit is about heady politics, agriculture and food will be part of the final deal on the terms under which the UK leaves.

It was surprising that Mrs May believed she could do a special deal for Northern Ireland without upsetting the party keeping her in power – and without triggering similar demands from Scotland and Wales. The discussions underlined why agriculture is central to the Brexit debate.

In the first place the CAP is one of very few common policies across the EU. This is why it accounts for so much of the budget. Beyond that it is Ireland's biggest industry and biggest source of export earnings. Its main market is the UK, and Dublin will do whatever is necessary to protect that market. If that means blocking any deal for the UK that would damage those interests, Ireland will have no qualms about doing so.

The concern for the DUP is about anything that changes the political status of Northern Ireland, but beyond politics there are more practical concerns. On the face of it a deal that allows a part of the UK to be in the EU single market and in the UK at the same time might seem attractive. However there is a real danger that businesses could end up dealing with two sets of regulations. This could restrict their access to the UK market and any trade deals the UK government makes, while denying them the full benefits of EU membership. In short, the danger of being neither in nor out of the UK or the EU.

It is difficult to see how this could work in practical terms. To be in the single market, Northern Ireland, or Scotland if it persuaded the government to let it have the same deal, would need to meet all the standards of the EU. That would include CAP and environmental regulations, including greening. It could leave many farmers who voted to leave the EU facing new UK regulations and the CAP rules they wanted to escape.

That would not only be a case of being out of the Brussels pan into the London fire, but potentially a case of the pan catching light on the fire to make things even worse. This is the logical outworking of what 'no regulatory divergence' would mean in practice.

The other issue this raises is how the UK would be protected from EU imports channelled in via the Republic of Ireland and Northern Ireland. This would be an issue if the UK leaves the single market with no deal, opting to operate instead on the basis of World Trade Organisation tariffs. This would be a big boost for Ireland, which could use the arrangement to secure tariff free access to the UK food market, where it is the biggest competitor for UK beef, lamb and dairy suppliers.

The other side of that coin is that the EU would seek to protects itself against third country imports channelled through Ireland. These will be the result of free trade deals the government has promised. Included would be cheap meat from Asia and South America or dairy products and lamb from the southern hemisphere.

This has already set alarm bells ringing in some EU member states. The French farming lobby has come out against the deal that was flagged up earlier this week, claiming it would allow Ireland to be used as a back door way to get imported or even UK food into the EU.

While this will settle as it becomes evident that some form of halfway house arrangement is a non-starter, that issue flagged up by the French will remain a problem. If the UK wants to throw open its market to free trade in food, farmers will lose out. They also stand to lose out twice, because imports will also be used as a reason to put obstacles in the way of any deal to give the UK access to the EU-27 market after Brexit.