Twenty years ago Wales (barely) said Yes to devolution. Despite a Welsh Assembly being supported by the wildly popular new Prime Minister Blair and opposed by the very unpopular Conservatives, the public gave the most grudging endorsement to partial self-rule.

A lot of water has flowed under many Welsh bridges since then. Public opposition to devolution fell away surprisingly quickly after 1997; the latest evidence, which I will be presenting in Cardiff on Monday, confirms that a clear majority in Wales now support devolution. There is little political opposition either. The Conservatives swiftly accepted the referendum result; since returning to power at Westminster they have overseen two Wales Acts transferring additional responsibilities to the National Assembly. Many Tory voters remain unconvinced and they constitute a large portion of Wales’ remaining devo-sceptics. But there is no chance of a Conservative manifesto advocating abolition: we are all devolutionists now.

But that does not mean all is well. And it is Brexit that is stirring the pot. Wales voted for Brexit – following the line of Tory Assembly leader, Andrew RT Davies, but against almost every other member of the Welsh political elite. Yet delivering Brexit poses substantial challenges to devolution, and could have troubling implications for Theresa May’s government, and the UK as a whole.

The devolution legislation for all three non-English nations have always explicitly assumed EU membership. Many major devolved policy areas, like agriculture, fisheries and the environment, are heavily ‘Europeanised’. Brexit will presumably mean removing much of the external European scaffolding that has surrounded the internal constitutional innovation of devolution. A question almost un-asked during last year’s referendum was what happens if that scaffolding is removed.

The governments in both Edinburgh and Cardiff contend that devolved policy areas are devolved and will remain so. Any greater freedom of policy movement in these areas generated by Brexit will be for them to exercise. If any new cross-UK frameworks are needed – animal health regulations are often given as an example – then these must be for all the different governments involved in running these policies to agree.

The UK government takes a very different view. Powers are returning from the EU to the UK, and it is for the UK government and parliament ultimately to decide where those should rest. They are prepared to talk to the devolved governments – although those talks in general do not seem to be going well. But there is a clear hierarchical understanding of the relationship.

Beneath the technical detail of statutes and policy implementation lies a fundamental philosophical difference. When they changed their policy on devolution the Tories accepted partial self-rule for the UK’s non-English nations. But they – and, in truth, nearly everyone else in Westminster and Whitehall – show little sign of understanding, let alone accepting, the other dimension of sub-national political empowerment that scholars have identified: shared-rule, wherein the constituent units of a state participate in deciding the allocation of powers and resources across the state as a whole.

Shortly after the general election, the Welsh Labour government made a strong pitch for new structures of shared rule in the UK, to help address the implications of Brexit. And it was striking to see, in immediate response to the publication of the EU Withdrawal Bill, a joint statement issued by the Scottish and Welsh First Ministers. Given the toxic relationship between their respective parties this was an extraordinary thing for Nicola Sturgeon and Carwyn Jones to do. But considerable common ground exists between a Welsh Labour government that has been thinking increasingly radically about the transformation of the UK and an SNP government that, after its recent setback at the general election, has rediscovered an interest in reconstructing the British state and not simply leaving it.

Twenty years on from the referendum, devolution is, and has been for some time, the settled will of the Welsh people. But there isn’t much about devolution itself that is settled. Brexit is the next battleground on the UK’s devolution journey.