FITTINGLY for a business that has peddled discretion for 271 years, the Zurich office of Wegelin is easy to miss. But according to an indictment unsealed in New York on February 2nd, Switzerland's oldest bank brazenly helped its clients dodge American taxes on $1.2 billion in offshore accounts and poached American clients from UBS, a giant Swiss bank that prosecutors ensnared earlier.

This first indictment of a Swiss bank has rocked the country's financial industry. Konrad Hummler, Wegelin's boss, had bluntly defended the right of banks to shield clients from their governments' tax regimes; he once dismissed critics as “tax cartels” and “illegitimate states”. Now even humble pie may not save his bank from a criminal conviction in America.

Governments once turned a blind eye to their wealthy citizens' offshore tax acrobatics. Now they are strapped for cash and hungrily hunt every penny in tax revenue. So a cold war on banking secrecy is turning hot. Tax evasion costs governments $3.1 trillion annually, according to Tax Justice Network, a lobby group. America, Britain and Germany have sought deals with Switzerland, Liechtenstein and other havens; the European Union is tightening up. Emerging powers like India are waging their own campaigns, too.

Swiss law entrenched bank secrecy in 1934, making it a criminal offence to reveal a client's identity. This has created the world's biggest tax haven: Switzerland's banks house around $2.1 trillion, or 27%, of offshore wealth, according to the Boston Consulting Group (see chart). Swiss bankers and regulators have long dodged and blunted outsiders' efforts to erode banking secrecy: out of a principled deference for their respectable and prudent customers' privacy, they insist; because of the fat fees paid by crooks, tax-dodgers and dictators, say critics. America has taken the toughest stance. It wants 11 Swiss banks to hand over their American clients' names. In the first big breach in Swiss secrecy, UBS agreed in 2009 to pay a $780m fine for aiding tax evasion and turned over data on more than 4,400 accounts. Last month several more banks handed over client details, but encrypted the data pending a final deal. This, plus the indictment of Wegelin, is expected to scare many Americans with offshore accounts into voluntarily coming forward. America's Internal Revenue Service (IRS) has launched its third amnesty programme in as many years. But more woes loom. Starting in 2013, the Foreign Account Tax Compliance Act (FATCA) will put the burden on foreign financial institutions to look for and report American account-holders or face a 30% withholding tax on American investments. Though FATCA may raise $10 billion over ten years, the costs for the foreign banks that have to implement it could be a lot more. America gave some ground on February 8th, outlining a gentler timetable and an easier ride for low-risk banks. Other governments have taken an altogether softer tack. Rather than trying to force Switzerland to abandon its policy of keeping client accounts anonymous—and risk getting nothing—Germany and Britain last year both negotiated bilateral “Rubik” deals (named after a cubic puzzle that can be solved only with moves in strict sequence). Offshore-account holders must pay a lump sum to make up for unpaid taxes, plus an annual withholding tax. Switzerland then collects the money and passes it along. But the names stay anonymous. Many see that as a big Swiss win. Critics also say British hopes that the deal could raise up to £7 billion ($11 billion) are hugely optimistic.

Now America's stance is stiffening spines elsewhere. German politicians claim their Rubik deal lets Switzerland off too easily. And the European Commission says both deals may be illegal under the EU savings-tax directive of 2005, because they let offshore-account holders pay a lower rate of withholding tax without having to reveal their identities. Algirdas Semeta, the commissioner for taxation, says the deals must be renegotiated. Britain and Germany, he says, have quietly agreed to do so rather than risk ending up in the European Court of Justice. Officials in London and Berlin had no specific comment on that.

Mr Semeta's “top priority” this year is to toughen the EU savings-tax directive further. He hopes to gain a negotiating mandate this month. Assuming Luxembourg and Austria, the EU's own two tax havens, agree, that could mean more withholding taxes, and a squeeze on discretionary trusts (complicated and murky entities adored by tax lawyers).

The big goal is automatic information exchange between countries' fiscal authorities. This would spell the end of Swiss banking secrecy and be a fatal blow to other tax havens. For now, the standard imposed by the Organisation for Economic Co-operation and Development, a Paris-based good-government club, is “information on request”. Switzerland agreed to this only when threatened with blacklisting. A government can ask for data about specific offenders; but no fishing expeditions are allowed, and the number of requests permitted each year is capped. “It's as if the OECD has been asked to drain a swamp and they're handing out drinking straws,” says Nicholas Shaxson, a former Economist journalist and author of “Treasure Islands”, a book about tax havens.

Mr Semeta insists he is ready to take a harder line with Switzerland this time around and will use “sticks”, not just “carrots”. One such weapon could be to restrict Swiss access to EU markets.

The secret's out

The sparring has bruised the Swiss. Many were furious about the indictment of Wegelin. “During peace talks you don't attack,” says Martin Naville of the Swiss-American Chamber of Commerce. But others are growing weary. Public support for secrecy is waning. When Philipp Hildebrand, the central-bank boss, resigned in January over a currency trade by his wife, public concern centred on his possible lapse of judgment, not the privacy breach that revealed it (the trade was leaked by an employee at a private bank). In years past, it would have been the other way round.

Even in financier-friendly Switzerland, the economic crisis has dented bankers' popularity, as have public revelations about money laundering and shady conduct. Two whistle-blowers have rocked the banks: Rudolf Elmer, who gave documents to WikiLeaks about the Cayman operations of Julius Baer, another Swiss private bank, and Bradley Birkenfeld at UBS. Both have had legal troubles as a result.

The uncertainty is bad for business. Even bankers talk resignedly about the need to reach a settlement soon, although few agree what it should look like (and even fewer would countenance automatic information exchange). At the very least, banks are going to have to write some hefty cheques. On February 6th the boss of Julius Baer, the largest Swiss private bank, said he was expecting to have to pay a fine to the IRS. Booz & Company, a consultancy, says that the Swiss financial sector may lose SFr47 billion ($51 billion) in assets and SFr1.1 billion in revenues as a result of just the German and British deals. And those were the lenient ones.

Some say clients are already shifting assets to more fortress-like jurisdictions like Singapore (such outflows are all but impossible to measure). As they fight off attacks, Swiss bankers are trying to come up with an alternative business model. “Plan B” is to focus more on rich customers in politically unstable developing countries. In short, if Switzerland cannot peddle secrecy, it can at least offer stability. Helping rich people in poor, weak countries hang on to their ill-gotten gains may be lucrative, whatever the reputational risk.

The embattled Swiss bemoan the pressure and even like to label their detractors “imperialists”. A common (and reasonable) complaint is that many of the countries pressing them are also tax havens in their own right. The United States houses money from Latin America in its Florida banks, and under Delaware and Nevada law it is easy to set up a tax-friendly shell company. Britain has the Channel Islands. “They have no moral right to push Switzerland on this, because they haven't cleaned up their own mess,” harrumphs a Swiss proponent of secrecy. But, clearly that is not stopping them.