Switzerland and the United States have reached agreement on a double taxation treaty, the Swiss finance ministry said on Friday, a key step toward removal from a list of tax havens.

Switzerland, whose private banks manage around $2 trillion of foreign wealth, aims to secure 12 new bilateral tax deals by the end of 2009 which could allow it to be removed from an OECD grey list of states which need to improve tax cooperation and avoid possible sanctions from G20 nations.

Talks with Washington are particularly crucial for Berne as U.S. authorities have accused Swiss bank UBS of helping rich clients to hide money in secret Swiss accounts. UBS is losing clients because of the bad publicity.

While the Swiss-U.S. agreement had never been dependent on solving the case against bank UBS, it could prove difficult to force through parliament without a solution, a spokesman for the Swiss Finance Ministry said.

UBS shares reversed losses after the news and were 2.1 percent higher at 14.80 Swiss francs by 1249 GMT, just ahead of the European banking sector <.SX7P>.

UBS was not immediately available for comment.

Under pressure from the G20, Switzerland agreed in March to relax its prized bank secrecy and accepted for the first time to share certain bank client data with other jurisdictions once bilateral tax treaties are ratified.

The U.S. deal is in compliance with OECD guidelines, the ministry said.

The decision will permit an exchange of information on tax matters in individual cases where a specific and justified request has been made, it said in a statement.

It is the sixth such agreement the Swiss have struck, after Denmark, Norway, France, Mexico and one other unnamed country.

SECRECY

The U.S. government is suing UBS to retrieve thousands of names of American clients who allegedly stashed money in secret accounts in contravention of U.S. tax laws.

UBS is fighting the civil suit and says compliance would require its employees to commit fraud in Switzerland, which jealously defends its bank secrecy legislation.

The bank settled with the U.S. Department of Justice in February to avoid criminal charges by agreeing to pay a $780 million fine and providing a certain number of U.S. account holder names.

UBS has pledged to transfer all its U.S. offshore clients to onshore accounts in the United States, removing another barrier to cutting a deal.

(Editing by David Jones)