The author is a Reuters Breakingviews columnist. The opinions expressed are his own.

Two of the European Union’s biggest risks – Greece’s bailout and the UK vote over EU membership – may collide this summer. Hellenic financial struggles and British soul-searching over whether to stay in the union may seem to have little to do with one another. They are, after all, occurring at opposite ends of Europe.

However, the International Monetary Fund and the EU are at odds over Greece’s bailout, something graphically highlighted by what WikiLeaks claims is a leaked transcript of an internal IMF call. If they can’t resolve their dispute quickly, Athens could run out of cash in July. The sense of crisis would be mounting just as the UK votes on June 23 on whether to remain in the EU or leave it.

Britain isn’t in the euro zone and doesn’t have to contribute to Greek bailouts. So logically, there should be no connection. But British eurosceptics would exploit the sense that Greece was back on the brink of bankruptcy to argue that the UK should put clear water between itself and the EU. They are already successfully exploiting Europe’s refugee crisis for the same purpose, even though the UK is not part of the border-free Schengen Area.

If everything had gone according to plan, the first review of Greece’s latest 86 billion euro bailout would have been completed. Athens would have got extra cash to deal with its immediate needs. Its creditors would also have agreed to “reprofile” its medium-term debt repayment obligations so that it wouldn’t face difficulties from 2022 onwards.

By now, the European Central Bank would also have included Greek debt in its quantitative easing programme, and, as a result, bond yields would have dropped. Even more importantly, the country’s banks would be on track to borrow long-term money at negative interest rates from the ECB to lend to companies and households, under its targeted long-term refinancing operations. All this would have put the economy on the road to recovery.

This rosy scenario has not materialised. Part of the explanation is foot-dragging by the left-wing government led by Alexis Tsipras. It has been slow to come up with proposals for tightening medium-term fiscal policy to hit a targeted 3.5 percent primary surplus in 2018. It also isn’t keen on structural reforms to boost the economy’s long-run productivity, in particular to let banks sell their vast backlog of non-performing loans so they can concentrate on new lending.

However, the main reason why the bailout review hasn’t been completed is that the IMF and the European Commission are at loggerheads over what is needed. The IMF is both more hawkish and more dovish.

The fund thinks that if no new measures are taken, Greece will have a 1 percent primary deficit in 2018 – that is, before interest payments are taken into account. The commission expects a surplus of around 0.5 percent. As a result, the IMF believes Athens needs fiscal measures equal to 4.5 percentage points of GDP to hit the 3.5 percent 2018 target, while the commission argues 3 percentage points would do the trick.

On the other hand, the fund also thinks it would be impossible and counterproductive to inflict another 4.5 percentage points of austerity on Greece. It is arguing that 2.5 points is the most the country can take.

The snag is that, on the IMF’s figures, this would mean Greece would only achieve a 1.5 percent primary surplus in 2018. That, in turn, would mean that its euro zone creditors would have to be more generous in relieving the country’s debt load so that it is sustainable in the long run.

One way of resolving the impasse would be to kick the IMF out of the Greek programme, as the government wants. It may seem odd that Tsipras wants to get rid of an institution that is arguing for more debt relief. But he is less concerned with the details of a debt deal that won’t kick in until the next decade than with getting a deal done fast. The premier presumably thinks this would revive his fast-fading popularity.

Tsipras will struggle to get the IMF monkey off his back, because Germany has been insistent that the fund stays in the game. Even if Angela Merkel wished to change her mind, the Bundestag parliament would be hostile to the idea. True, Germany doesn’t want to let Greece wriggle out of its commitment to a 3.5 percent surplus, and is reluctant to consider debt relief it actually agreed to last year. But it likes the fact that the IMF is stricter on structural reforms and making sure the numbers add up than the commission.

Hence, the dilemma posed by a top IMF official in the WikiLeaks transcript: “Look, you Mrs. Merkel you face a question, you have to think about what is more costly: to go ahead without the IMF, would the Bundestag say ‘The IMF is not on board’? or to pick the debt relief that we think that Greece needs in order to keep us on board?”

Maybe Merkel can decide which way to jump in the next few weeks. If so, the Grexit risk can be defused before the Brexit referendum. Maybe, too, some fudge can be found that stops Greece going bust in July but postpones the real decisions until after the UK votes. If not, the two risks could clash horribly.

Hugo Dixon is chairman of InFacts, a journalistic enterprise arguing that Britain should stay in the EU.