Switzerland  the land of chocolate, watches and neutrality  isn't known for flexing its muscles in a heated standoff with another country. But now it finds itself pitted against the U.S. in a David and Goliathstyle imbroglio that could damage diplomatic and economic relations between the two for years to come. On one side, the U.S. Department of Justice is accusing Swiss banking giant UBS of helping wealthy Americans hide billions of dollars from the tax man and insisting that the bank reveal their identities. On the other, the Swiss government is threatening to step in to protect the country's famous secrecy laws. The two have until Aug. 3 to come up with an agreement  or continue the fight in court.

UBS has been under investigation by the Department of Justice since last summer for allegedly helping wealthy Americans hide $20 billion in undisclosed offshore accounts to evade taxes. To absolve itself of criminal charges, the bank, one of the world's largest wealth managers, agreed to pay a $780 million penalty and release the names of 250 clients whom the Internal Revenue Service suspected of evading taxes. (See pictures of tea-party tax protests.)

But that wasn't enough to end the bank's troubles. In February, the Department of Justice filed a civil lawsuit against UBS seeking the identities of 52,000 more Americans suspected of stashing a total of $15 billion at the bank. This time, the Swiss were having none of it. Citing bank-client confidentiality guaranteed in the Swiss constitution, Switzerland's government has forbidden UBS from complying. It has also threatened to "take control of the data at UBS" to prevent the bank from handing the accounts over to the Americans.

The Swiss claim that the U.S. proceeding against UBS breaks the terms of the treaty between the two countries that permits an exchange of information on tax matters only in individual cases where a specific and justified request is made. "The blocking order that the Swiss government is prepared to issue would be a first, but it's a reasonable step to take in light of the IRS's threatened disregard for international treaties and provisions of Swiss law," says James Nason, spokesman for the Swiss Banking Association (SBA), a trade group for Switzerland's financial institutions. (Read "The Swiss Question Their Once Proud Banks.")

The case was due to reconvene in Miami on July 13, but an eleventh-hour temporary reprieve was granted over the weekend, with a U.S. federal court postponing the ruling until Aug. 3 to allow both countries to negotiate a settlement.

In the meantime, the U.S. government's insistence on enforcing its laws on foreign soil doesn't sit well with the Swiss. "The U.S. seems to prefer the role of an increasingly obnoxious tyrant," says Andy Sundberg, a retired businessman and founder of the Geneva-based American Citizens Abroad, an advocacy group for expatriate U.S. citizens. "It is obsessed with humiliating this small country, forcing it to betray the principles of its own constitution."

Sundberg says that with the IRS intensifying its hunt for alleged tax evaders, Swiss banks, fearful of potential legal problems, are closing the accounts of resident Americans and refusing to open new ones. Both UBS and Switzerland's second largest bank, Credit Suisse, have told Americans to move their money into specially created units registered in the U.S., or lose their accounts. Many smaller Swiss banks are simply turning away Americans. (See pictures of the top 10 scared traders.)

While the long-term damage to UBS may be difficult to gauge, experts say its reputation as a reliable institution has taken a beating. "Clients worldwide have lost trust in UBS's ability to protect their privacy," says Teodoro Cocca, former professor of asset and wealth management at the Swiss Banking Institute in Zurich. "This will affect UBS's attraction for wealthy clients  the main franchise of the bank."

But others are confident that the damage will be limited to UBS. "We don't foresee any negative impact on the Swiss banking industry as a whole," says Martin Naville, CEO of the Zurich-based Swiss-American Chamber of Commerce, an organization that helps Swiss companies in the U.S. and U.S. companies in Switzerland expand their businesses. "It's the cleanest system in the world, with strict laws on money laundering, terrorist finances, corruption and other illicit activities." (Read "The Scandal of Secret Swiss Bank Accounts.")

The future of Swiss banking secrecy, long a bone of contention among Switzerland, the U.S. and the European Union, also looks to come through this scandal unscathed. In a recent SBA poll, 91% of respondents favored the protection of their privacy in financial matters. "It's an expression of mutual trust between the Swiss state and its citizens," SBA's Nason says. "The government is able to secure its tax revenues without having to trample on privacy by demanding an automatic right of forced entry into bank accounts. The Swiss take great pride in this arrangement and reward it with a very high level of taxpayer honesty."

The U.S., however, has warned Switzerland that if a deal is not reached in the UBS case, it will "vigorously pursue" the matter and may even seize the bank's American assets. But such an aggressive response "might destabilize UBS and have a major impact on the American economy, so the U.S. government should proceed at its own risk and peril," says the Swiss-American Chamber of Commerce's Naville, who points out that both countries have "a lot at stake" in each other's economies. Switzerland is the U.S.'s 15th largest export market and, with almost $149 billion spent in 2008, its fourth largest recipient in terms of direct investment. Switzerland, for its part, invested nearly $195 billion in the U.S. last year. (See the top 10 tax dodgers.)

As the clock ticks toward the Aug. 3 deadline, the Swiss are hoping that the future of their secrecy laws is something they can still bank on.