The latest phase of Italy’s banking crisis is linked to the Brexit vote, which has rattled markets across the continent. But the UK voting to leave the EU didn’t expose any particularly new problems over in Italy. Italian banks’ weaknesses were first exposed by the global financial crisis, but unlike in many other affected European countries, Italy’s banks didn’t immediately go through a period of reform.

In total, about €360 billion (paywall)—17% of the banks’ balance sheets—are “non-performing” (that is, unlikely to be repaid in full).

Some are saying the country has now missed the window of opportunity to clean up its banking sector without widespread pain, since the EU’s bail-in rules are now into force. On July 29, the results of Europe’s latest stress tests will reveal more gory details of Italy’s horrifying bank balance sheets. European officials are waiting for those details (paywall) before saying too much about what they are willing to do to help Italy get out of its mess.

Another referendum looms

So, what are Italy’s options? Trying to skirt the EU’s bail-in rules would damage its relationship with the bloc, which is keen to stick to rules it only just passed. The last thing the EU wants is another wayward member rejecting its strictures.

There is one possible loophole. Italy could say that savers were mis-sold the bank bonds as less risky than they turned out to be, and create a fund to compensate savers for the losses imposed by the EU’s bail-in rules. It would be a classic European fudge: By the letter of the law, creditors are bailed-in, but in practice they’re repaid in full.

All told, after write-downs, bail-ins, and the like, Italian banks may need around €40 billion to boost their capital cushions to suitable levels, which is about what it cost to rescue Spanish banks a few years ago. The euro zone was willing to provide up to €100 billion to Spanish banks, so it’s not as if an Italian bailout is unaffordable. It’s just complicated.

At a time when the EU has been severely jolted by one of its biggest members, it is not in the mood to bend its rules for another troublesome country. But at the same time, there is a risk that the anti-EU mood among Italians, which is already strong, could be provoked further if the government is seen as putting supranational rules before ordinary citizens. Fittingly, Italy is holding a referendum in October on constitutional reforms to streamline the country’s governance.

Renzi is likely to step down if the vote goes against him, risking another poll-driven exit that the EU can ill afford.

📬 Sign up for the Daily Brief

Our free, fast, and fun briefing on the global economy, delivered every weekday morning.