Democracy and the rule of law seem solid until greed gets in the way. That is the story of Danske Bank, a reputable Danish bank, whose Estonian branch handled €200bn (about $227bn) in suspicious transactions from 10,000 non-resident customers between 2007 and 2015.

The chief executive, Thomas Borgen, has resigned, Criminal investigations are underway in Denmark, Estonia, the United States, and possibly other countries (a lot of the money went via London). Those involved deny wrongdoing. But regardless of who is specifically to blame, something clearly went badly amiss. Danske Bank is a reputable bank. Denmark and Estonia are reputable countries. Warnings abounded that the financial flows were questionable. Nobody acted on them.

The political fallout is already clear. Estonia, Latvia, and Lithuania have all had problems with their banks. Latvia’s Parex Bank, which specialized in non-resident accounts, required a billion-dollar bailout in 2008. Latvia’s third-biggest bank, ABLV, went into forced liquidation earlier this year amid allegations of money-laundering and sanctions-busting.

Lithuania’s Snoras Bank, majority-owned by a Russian citizen, was nationalized in a hurry in 2011 amid alarming reports of fraud. President Dalia Grybauskaitė called its activity “an attack not only on the banking system of Lithuania, but also on the interests of the Lithuanian society.” Any trace of Estonian smugness about its neighbors’ difficulties in managing big flows of hot money has now evaporated.

The damage comes in several forms. One is to public confidence in business ethics. Banks are inherently a weak point in the financial system because of their business model: they lend out money which they cannot immediately get back, but are obliged to pay depositors instantly. This means they need to be particularly trustworthy (and depend ultimately on central bank and government guarantees). Banks have another vulnerability: they attract dodgy customers seeking a gateway to the rest of the financial system. To resist these temptations, bankers should be choosy, prudent, thrifty, and ethical types not reckless corner-cutters trying to make quarterly profit figures look good.

Banking scandals deliver an even more serious blow to regulators’ reputation. Bankers may fall prey to temptation. But regulators are paid to warn them and intervene if necessary. When they fail to do so, the public is right to be alarmed. Why did they not notice wrongdoing promptly? Were they just incompetent? Or was something more sinister afoot? These questions can be levied not only at local regulators but also at the European Union.

The third blow is to the reputation of the country. In the 1990s, the Baltic states battled to ditch their reputation as the “wild east”—a fringe region that lived off rackets and smuggling. I lived in Estonia in the early 1990s, at a time when it was one of the largest metals exporters in the world, despite having no indigenous metallurgical industry. Now their hard-won reputation as a modern European economy is at risk. Outsiders will wonder if Estonia’s facade of prosperity is based on the profits of a giant casino. They will worry that Latvia and Lithuania have not put their problems behind them either. For countries like Ukraine, trying to establish their reputation as a serious trade or investment partner, life just got a little bit harder.

The biggest beneficiary of all this is Russia. The Kremlin loathes the idea of its former colonies becoming economic or political success stories. So it uses money to attack them. The financial malpractice pays an immediate dividend in terms of successful money-laundering, but also a political one in terms of damaged reputations. Local banks, in short, are a far graver threat to national security than the enemy’s tanks.