The Federal Court in Lausanne has ruled that the transfer of confidential UBS bank details to United States tax investigators in 2009 was legal.
The ruling overturns an earlier decision by the Federal administrative court that said the Swiss Financial and Market Supervisory Authority (Finma) had abused its power when it ordered that details of about 250 account holders suspected of tax evasion in the US be handed over.
Finma maintained that it had made its decision after consultations with the government and based on an emergency clause in the banking law which allows it to take undefined actions to protect the Swiss economy.
In its decision on Friday, the Federal Court ruled that Finma had acted within the law. It said that although the banking law did not provide sufficient legal protection, Finma had acted legally in basing its decision on guidelines from the government.
The ruling by Switzerland's highest court means the UBS account holders involved in the matter have no further legal recourse for complaint in the country.
Douglas Hornung, a lawyer for several UBS clients whose details were transfered to US authorities said he was disappointed with the decision.
"The judges deliberations lasted more than four hours which signifies they were very divided," Hornung said. "The final decision was three votes to two."
A spokesman for UBS said the judgement showed that Finma had acted correctly and the bank believes there is no legal basis for account holders to file complaints against it for compensation in the matter.
A Finma spokesman said the organisation had no comment on the ruling.
swissinfo.ch and agencies