The Swiss government on Wednesday confirmed that it will put a landmark settlement involving UBS and suspected US tax evasion before parliament in a bid to resolve legal objections to the deal.

Bern has been forced to intervene after a Swiss court ruled last month that the accord, which would have seen the account details of thousands of UBS clients turned over to US authorities, violated Swiss law.

The Swiss Justice Ministry said that a number of formal amendments would be made to remedy the agreement’s “shortcomings” before putting the revised deal before parliament later this year.

“The move will allow Switzerland to fulfill its obligations under international law, and bring a final resolution to its legal and sovereignty dispute with the USA,” the ministry said.

The bruising legal battle had already inflicted severe damage on UBS’s flagship private banking business, with thousands of wealthy clients decamping for rival banks and tens of billions flowing out of the business.

Under the terms of the original deal, the Swiss government agreed to turn over the details of 4,450 wealthy Americans suspected of using offshore UBS accounts to evade US taxes.

In deference to Swiss legal sensitivities, the original accord was framed in the context of existing bilateral treaties covering bank secrecy. The accord also gave UBS clients the right to challenge any lifting of confidentiality.

However, in the first “pilot” challenge to the agreement last month, a Swiss court ruled that revealing the client’s name had been illegal, based on a distinction between tax evasion and tax fraud.

Under Swiss law, tax evasion, which means failing to declare an asset, is a civil offence, but not a crime. Tax fraud, which includes falsifying documents, is a criminal offence.

The Justice Ministry said on Wednesday that the revised version of the agreement to be put before parliament would take precedence over existing bilateral agreements.

“As a result, Switzerland will be in a position to provide treaty assistance not only in cases of tax fraud, but also in cases of continued and serious tax evasion.”

The government also said it would bill UBS SFr1m ($922,000) for its legal costs in the case.

UBS said in a separate statement that it would fulfill all of its commitments under the settlement agreement.

Copyright The Financial Times Limited 2018. All rights reserved.

Comments have not been enabled for this article.