The days of secret bank accounts are numbered for Americans after UBS and the U.S. and Swiss governments agreed to settle a dispute over whether the Swiss bank should be forced to disclose the names of 52,000 rich U.S. clients suspected of tax evasion.

Lawyers involved in the case said Wednesday's settlement could involve the disclosure to U.S. authorities of 3,000 to perhaps more than 10,000 names of American clients suspected of using offshore accounts to evade taxes.

While details weren't disclosed, the parties have initialed agreements that will take a little time to be signed in final form, Department of Justice lawyer Stuart Gibson told U.S. District Court Judge Alan Gold during a brief conference call.

The case is expected to be dismissed once a final agreement is in place. UBS and the government had reached a settlement in principle on July 31.

The deal is also expected to put European tax dodgers on notice as other governments are encouraged to seek out hidden accounts.

U.S. authorities believe the 52,000 U.S.-based clients of UBS may be hiding nearly $15 billion of assets.

Washington's case against UBS, the world's second-largest wealth manager, had strained relations between the United States and Switzerland because it challenged the latter's jealously guarded bank secrecy laws.

UBS shares closed 3 percent higher in Switzerland and were up more than four percent in afternoon trading in New York.

This is definitely good news for UBS, said Milan Patel, a tax lawyer at Withers LLP in Geneva.

However, this may mean that UBS could face a new legal battle in Switzerland if the account holders claim UBS violated Swiss bank secrecy laws by disclosing their names, Patel added. Thus, UBS may have ended the U.S. legal battle only to start the Swiss legal battle.

OVERHANG LIFTED

In February, UBS agreed to pay $780 million to settle criminal charges in a similar dispute with the U.S. government. The bank agreed to hand over data on about 250 U.S. clients, and promised to close its offshore business to U.S. clients.

UBS Chairman Kaspar Villiger said the bank was grateful that the two governments had resolved their differences in the latest case. The bank said it expected a final agreement in the near future.

Doug Shulman, commissioner of the Internal Revenue Service, the U.S. tax collection agency, said the pact with Switzerland protects the United States government's interests.

Both governments must now sign off on the settlement, the Swiss Justice Ministry said.

A settlement would eliminate one overhang for UBS, whose losses on toxic debt led to a 6 billion Swiss franc ($6.45 billion) injection from the Swiss government last year.

The Swiss government has said it would like to sell its 9 percent stake in the bank soon.

U.S. authorities had sought the names of UBS clients they believed had either inherited substantial wealth and have European roots, are frequent business travelers who receive offshore compensation via Swiss accounts, or intended their accounts from the start as a means to avoid U.S. taxes.

But UBS, backed by the Swiss government, held onto the names, calling the U.S. demand a fishing expedition that would breach bilateral tax agreements and Swiss bank secrecy laws, which have been eroding in recent years.

It is not possible to say just how well the Swiss did in resisting full compliance, said Robert Katzberg, a New York white-collar criminal lawyer at Kaplan & Katzberg who represents some U.S. taxpayers in the UBS matter.

He said he expected the United States to receive much of what it has been seeking.

Many other banks have also started to shut down secret accounts of U.S. clients, and lawyers believe their efforts may soon extend to other countries' citizens as well.

For U.S. taxpayers it is going to be impossible to hide money in Switzerland, and it is just a matter of time that this is the case also for Germans and Britons, said Asher Rubinstein, a partner at Rubinstein & Rubinstein LLP in New York. Switzerland will no longer be a tax haven.

OTHERS MAY SEEK AMNESTY

Alfred Mettler, a Georgia State University finance professor and member of a Swiss task force on bank secrecy, said it would likely take months to implement the UBS pact, and may foreshadow an IRS push to ferret out suspected tax cheats.

The IRS will certainly increase its efforts to go after non-taxed money wherever it is, he said. But you need some evidence, and my guess is other banks, not only Swiss banks, must have taken steps to be proactive.

Details of the UBS agreement may affect the pace of activity under an IRS amnesty program that lets Americans reveal secret Swiss bank accounts in exchange for lower penalties. That program ends on September 23.

The store is still open for voluntary disclosure, said William Sharp, a principal at Sharp Kemm PA in Tampa, Florida who represents some UBS clients.

UBS shares rose 3.1 percent to 16.34 Swiss francs in Switzerland. In the United States, they were up 4 percent at $15.30 in afternoon trading on the New York Stock Exchange.

The case is U.S. v. UBS AG, U.S. District Court, Southern District of Florida (Miami), No. 09-20423. (Additional reporting by Jim Loney and Jane Sutton in Miami; Juan Lagorio and Jonathan Stempel in New York; and Sven Egenter, Rupert Pretterklieber and Katie Reid in Zurich; Writing by Jonathan Stempel in New York; Editing by Ted Kerr)