The Swiss government says it will seize UBS client data if needed
Switzerland is trying to ensure UBS is not forced to hand over account details to the US authorities, an apparent reversal of promises to share tax data.
The Swiss government is arguing that handing over the client details would breach its national bank secrecy rules.
UBS is refusing to release data on 52,000 Americans that hold Swiss bank accounts to US tax authorities who accuse them of tax evasion.
Switzerland's largest bank, UBS faces a court hearing in Miami on 13 July.
In a case brought under civil law, it stands accused by the US of hiding close to $15bn (£9.33bn) in assets in secret accounts.
Back in February, UBS did hand over the details of 250 US clients to American authorities to avoid a criminal case, but it is continuing to refuse to pass on data on the further 52,000.
TAX EVASION v TAX FRAUD
Switzerland is unusual in distinguishing between tax evasion and tax fraud
Tax evasion is the deliberate concealing of assets
Tax fraud, in addition, involves lying on official documents
Both are criminal offences in most countries, but tax evasion is only a civil matter in Switzerland
On Wednesday, Switzerland's Justice Ministry said that UBS cannot hand over any more information about clients without breaking Swiss rules.
"Switzerland will use its legal authority to ensure that the bank cannot be pressured to transmit the information illegally, including if necessary by issuing an order taking effective control of the data at UBS," the Swiss government said.
"The [US] Internal Revenue Service now inappropriately seeks to provoke international conflict through this civil proceeding."
The topic of secrecy around Swiss banks has long concerned governments worldwide, who see it as a haven for those who seek to avoid taxes.
Under increasing pressure from other countries, Switzerland has so far this year pledged to meet global standards on sharing bank information, and establish reciprocal arrangements with other governments including the US.
However, the Swiss government had repeatedly said it will only hand over information "in individual cases where a specific and justified request has been made", or when requests are "concrete and justified".
Global rules on the sharing of bank account details are set by the Organisation for Economic Co-operation and Development (OECD).
Switzerland is currently on the OECD's "grey list" of countries that need to improve their exchange of tax information or face possible financial sanctions.