There were messy and embarrassing mistakes along the way. But, in the end, German Chancellor Angela Merkel got what she wanted: an end to the endemic system of money laundering and corruption in Cyprus.

If that means a further deterioration of relations between her and Russian President Vladimir Putin, so be it. No doubt she can live with that, at least until September, when Germany’s next federal elections will be held.

The deal reached in Brussels late Sunday night means that depositors with more than €100,000 in Cypriot banks will be saddled with a hefty levy. This is in order to raise the €5.8 billion needed to secure EU guarantees of over €10 billion. Most of that money will be collected by forcing losses on large deposit holders. The remainder will be met by tax increases and privatization.

Russians will almost certainly bear the brunt of the levy. Russian companies and individuals hold between €20 billion and €25 billion, or around one-third of the total bank deposits in Cyprus, according to reports. For a country with a GDP of €18 billion, that says a lot about the island’s dependence on foreign investors, of which Russia is one of the leaders.

The European Commission, the International Monetary Fund, and the European Central Bank (ECB)—known collectively as the troika—had no choice but to scrap the original plan to tax depositors holding up to €100,000. Merkel knew that too.

It was not just because the Cypriot parliament overwhelmingly rejected that proposal last week. The scheme’s legality was also questionable. The EU had agreed during the 2008 global financial crisis to guarantee savings of €100,000. Had the bailout plan been accepted by the Cypriot parliament, it would have set a dangerous precedent. The run on banks across Europe would have been swift and the ECB’s credibility severely damaged.

The Kremlin will be extremely angry about the latest deal—assuming that the Cypriot parliament will approve it. Putin already called the first plan “unfair, unprofessional and dangerous.”

Some analysts even suggested that the EU should have involved Russia in resolving the Cypriot crisis. In practice, that would have given Russia a seat at discussions among eurozone countries.

German politicians were decidedly against the idea. If Russia were given a say, then where would it stop, asked Cem Özdemir, one of the leaders of the German opposition green party. Merkel, who has very cool relations with Putin and is highly critical of his country’s human rights record and corruption, agreed. However, she also recognized Putin’s reluctance to rescue Cyprus, which has been a long-term supporter of Russia.

For any kind of Russian involvement, Germany would have insisted on an end to Russian money laundering in Cyprus. Last year Merkel received a detailed, confidential report by the German Federal Intelligence Service. It stated that an EU rescue plan could benefit Russian oligarchs, who had deposited €20 billion in Cypriot banks.

Since the report was leaked, opinion polls showed that a strong majority of Germans wanted Merkel to take a tough stance against Cyprus. For the public, this particular euro crisis was inextricably tied to Russian oligarchs, money laundering, and the lack of transparency in the Cypriot banking system.

Indeed, the Cyprus crisis has placed Putin in a quandary. Since becoming president again nearly a year ago, he has tried to link his campaign against corruption to values of patriotism and loyalty to the Russian state.

Last month, he introduced a draft law that would bar senior Russian officials from holding bank accounts or stocks outside Russia. It would apply to lawmakers, ministers, senior employees at the central bank and other state funds, and people whose work involves “the sovereignty or national security of the Russian Federation.”

Interestingly, the draft law has made little progress. It would, after all, hit the ruling elite, whose enormous wealth is leaving Russia instead of being invested in it. About €43 billion left Russia last year in capital outflows, according to the country’s central bank.

In that sense, Russia’s oligarchs and the wealthy were suddenly caught in the middle of the Cyprus crisis. Merkel was demanding an end to money laundering, meaning big depositors should be penalized. Putin was demanding, in the name of patriotism, for Russians to return home with their money.

Until corruption is tackled and the rule of law is strengthened in Russia, it is hard to see Cyprus’s Russian savers going home soon. But remaining on the island under the old idyllic conditions is not an option for much longer.