WOODY ALLEN once remarked that believing in God would be easier if He would show Himself by making a large deposit in a Swiss bank account in the director’s name. Parking riches in the Alps has become a less heavenly experience in recent years, thanks to America’s assault on its tax-dodging citizens and the moneymen who serve them.

Fearful that other banks could suffer the same fate as Wegelin, a venerable private bank that was indicted in New York in 2012 and put out of business, the Swiss government has been seeking an agreement with America that would allow the industry to pay its way out of trouble in one go. Instead, it has had to make do with one covering banks that are not already under investigation, which excludes some of the country’s biggest institutions.

The deal is cleverly structured. Of Switzerland’s 300 banks, 285 will be able to avoid prosecution if they provide certain information about American clients and their advisers, and pay penalties of 20-50% of the clients’ undeclared account balances, depending on when the account was opened and other factors. Banks that persuade clients to make disclosures before the programme starts will get reduced fines. Banks will not have to take part but the legal risks are daunting for those that don’t, even if they hold little undeclared American money. Those with no foreign clients will have to produce independent reports proving they have nothing to hide if they want a clean bill of health.

One Swiss newspaper likened the deal to “swallowing toads”. Another called it “the start of an organised surrender”. The bankers’ association sees it as a necessary evil: the only way to end legal uncertainty, albeit at a cost that will strain some institutions. Small and medium-sized Swiss private banks are already struggling. In 2012 their average return on equity was 3%; the number of private banks fell by 13, to 148, mostly because of voluntary liquidations. KPMG, a consultancy, expects this to fall by a further 25-30% by 2016 as receding legal threats encourage the return of mergers.

Some of the prospective buyers in any future M&A wave still have to make their peace with the Americans. Excluded from the deal are 14 mostly large banks that have been under investigation for some time, including Credit Suisse and Julius Bär. They will have to settle individually, with fines expected to be steep, some perhaps comparable to the $780m paid by UBS in 2009. These banks are also under pressure from European countries that have suffered tax leakage, including Germany, whose parliament has rejected a deal that would have allowed the Swiss to make regular payments of tax withheld from clients while avoiding having to name names.

Swiss bankers gamely argue that bank secrecy remains intact, pointing out that privacy laws have not been dismantled. But banks are being bullied into providing enough information, short of actual client names, to allow the Americans to make robust “mutual legal assistance” requests that leave Swiss courts with no option but to order banks to provide clients’ personal details. The courts still have some flexibility because America has yet to ratify an amended tax treaty with Switzerland, thanks to blocking tactics by Rand Paul, a senator who argues it would violate Americans’ right to privacy. But this obstacle will eventually be cleared or circumvented.