The Swiss government, vowing to protect its vaunted bank secrecy laws, said on Wednesday that it was prepared to seize UBS client data rather than allow the bank to hand it over to the United States to settle a tax case.

The dispute, which is playing out in federal court in a Miami, has become a test of Washington’s efforts to pierce Swiss banking laws as it tries to crack down on wealthy Americans who avoid taxes by hiding money in secret offshore accounts.

The Justice Department sued the Swiss banking giant UBS in February, saying it suspected the bank of helping Americans hide billions of dollars. But so far UBS has refused a demand that it turn over the names of 52,000 American clients, arguing that to do so would be illegal under Swiss banking secrecy laws and would open it to prosecution at home.

A hearing has been scheduled next week in Federal District Court in Miami. Swiss authorities, in a court filing Wednesday, said that they would not allow UBS to turn over the names.