Fanatical Brexiteers are bound to be disappointed. The European Union and the United Kingdom are so deeply interdependent that a real divorce is, in practice, impossible. Forget “taking back control.” What the U.K. is almost certain to end up with is an especially close “association agreement” — a legal arrangement used for countries that aren’t part of the EU but still want to cooperate closely with the bloc.

This is good news. Both for the the U.K., which desperately needs to avoid a no-deal Brexit, and for the EU. If there’s one positive thing to have come out of the Brexit turmoil, it’s that it has highlighted an obvious fact: There should be a way to be affiliated with Europe and part of the European institutions without being a full member of the EU.

Why? That would allow the core of the EU — its original members and anyone who wants to cooperate more closely — to move toward the more integrated, federalist Europe that will be crucial if the EU is to be able to provide its citizens with prosperity and security where member countries fail to do so.

At the heart of the Brexit negotiations is the question of what the association agreement between the U.K. and the EU should look like. There are different models. The obvious one, the European Economic Area, was quickly ruled out by both sides. The British government, supported by Labour Party leadership, argues that continued membership of the single market and customs union is not compatible with the referendum result; the EU, for its part, refuses to let the U.K. benefit from the perks of the single market without abiding by the four principles of freedom of movement.

For months, arguments have raged about whether a simple free-trade agreement — along the lines of Canada’s deal with the EU — would be sufficient for the U.K. The answer was clearly no. At a government retreat in July, the Theresa May’s Cabinet finally took the decision to maintain a very significant degree of regulatory alignment with the EU.

Both sides will have to compromise.

May hoped that doing so would guarantee substantial access to the EU market, continued participation in many EU common policies and robust security cooperation. But the so-called Chequers plan didn’t go down well, and prompted a number of high-level Cabinet resignations.

There is still much to negotiate. The question of how to articulate the future relationship in the binding political declaration that accompanies the Withdrawal Agreement is a particularly thorny one.

The EU invented a new-style association agreement for Ukraine in 2014, which it later copied for Georgia and Moldova. These arrangements, more modern than the EEA, provide a useful template for the U.K.’s future relationship with the bloc, on which formal negotiations can only begin after Britain officially leaves the bloc in 2019.

The Commission is an expert on the technicalities of this stuff. But Europe is less well prepared on a political level. The bloc should use the September summit in Salzburg — convened to discuss transatlantic issues and immigration — to reflect on its future relationship with Britain. Unless the EU is ready to conclude a robust and comprehensive association agreement with Britain, it will have truculent, litigious and nationalistic neighbor on its hands for many years to come.

Both sides will have to compromise. The U.K. should accept that it can’t keep up regulatory equivalence on services if it is not willing to come to an agreement on the mobility of people that respects EU rules on the free movement of citizens within the bloc. And the EU should be willing to accommodate a joint court, alongside joint political and technical institutions, to adjudicate on questions arising from the future arrangement. In return, the British will have to drop their inhibitions about the authority of the European Court of Justice. Most importantly, the association agreement will only work if it is dynamic; it should allow future relations to develop in a constructive way and be responsive to changing circumstances, both foreign and domestic.

That’s all fine for the short term, but it leaves the U.K. — a close ally of the EU, sharing many of its values and interests — unneccesarily distant from its partners across the English Channel.

The EU has of course left the door open for the U.K. to come back as a full member. But it would be wise to go one step further, as the cross-country Spinelli Group will propose in its manifesto this week, and prove an alternative route by creating a way to be part of the European Union.

The EU is due to revise its treaties. It should use the occasion to create a new type of “associate membership” that would entail a commitment to respect the values of the EU but not all of its political objectives.

An associate state could be expected to observe the first two Copenhagen criteria on the eligibility for membership — stable democratic institutions and a functioning market economy — but not the third, which demands adherence to the aims of political, economic and monetary union, for example.

A deep and comprehensive free-trade agreement would be a prerequisite for all associate members, but other aspects of the relationship — including customs arrangements — would vary on a case-by-case basis. One size would not fit all.

That would allow the countries that desire a stronger, more federated Europe to forge ahead, without unnecessarily alienating their closest allies. It would allow others — like the U.K. and other associate members such as Norway, Iceland and Switzerland — to upgrade their relationship with the bloc over time in a way that contributes to rather than detracts from European unity.

Andrew Duff is president of the Spinelli Group and visiting fellow at the European Policy Centre.