Swiss bank UBS braced on Friday for a high-stakes trial in the United States next week that could force it to reveal secret client data, as a last-minute deal remained elusive.

It was unclear whether wealth management giant UBS could reach a settlement to the damaging tax row before a court hearing starts in Miami on Monday, weighing on its shares.

Finding a solution to the matter may take longer than just the next few days, although one can never rule out a last-minute deal, a source familiar with the matter told Reuters when asked about the chances of a deal this weekend.

Washington has asked UBS to disclose the identity of 52,000 American holders of Swiss accounts suspected of not paying taxes, something UBS Chief Executive Oswald Gruebel cannot comply with as it would be in breach of Swiss criminal law.

But a settlement would most likely have to include a partial disclosure of client data, possibly in an indirect way, and a non-punitive financial penalty, a second source said.

A deal could involve Switzerland agreeing to disclose some UBS client information, possibly by helping the IRS cross-check U.S. banks' data about transfers from Switzerland and UBS.

Switzerland has vowed to seize UBS data to stop the bank from handing it over to U.S. authorities, in an attempt to defend its crumbling bank secrecy. It said the tax case targeting its best-known bank is souring diplomatic ties and that hitting UBS hard could destabilize the global financial system.

UBS, which employs 27,000 people in the United States and manages more than $600 billion at its Wealth Management Americas division, is struggling to recover from the subprime crisis.

A UBS spokesman said the Swiss bank would be open to a solution stemming from talks between the Swiss and U.S. governments. But he declined to say whether a deal was in sight.

The enforcement of the summons would require UBS to violate Swiss law. We have also stated that issues relating to the exchange of information in tax matters should be discussed and resolved between friendly governments, he said.

Analysts say failure to resolve the tax row ahead of the court hearing in Miami would hurt UBS's shares next week.

It is impossible to predict the outcome. We are telling clients to be cautious, Dirk Becker, a bank analyst at Kepler Equities. I am sure talks are happening right now. If the trial starts, this would be a bad sign for UBS.

On Wednesday, U.S. District Judge Alan Gold, set to preside over next week's hearing, gave the Justice Department until noon on Sunday to say whether it is prepared to seize UBS assets in its bid to force it to disclose data, raising hopes that a settlement was in sight.

Shares in UBS were 1.7 percent lower at 12.72 Swiss francs at 1416 GMT (10:16 a.m. EDT) against a 0.12 percent fall in the DJ Stoxx European Banking index.

FOCUS ON DATA, NOT BIG FINE

UBS Chairman Kaspar Villiger told Swiss television earlier this week that the focus of the tax discussions was access to the information related to U.S. clients of UBS. This is not about a payment, it is about data, Villiger said.

He also said that speculation of UBS having to pay billions of dollars in the tax dispute were completely unfounded.

Swiss media have said UBS risked having to pay 3 to 5 billion Swiss francs ($2.8-$4.6 billion) to end the litigation and some higher numbers were circulated.

It's certainly not about such sums, Villiger said, without qualifying his comment any further.

The Internal Revenue Service says U.S. clients hid $15 billion at UBS, or about 1 percent of the bank's managed wealth.

He noted that the row concerns a civil summons and that UBS already atoned for its mistakes when it agreed to a $780 million payment to end an earlier criminal lawsuit in February. The bank disclosed around 250 client names on that occasion, a serious blow to Switzerland's once impenetrable bank secrecy wall.

A separate source familiar with the situation said it was unlikely that any new payment would be above $1 billion.

To charge them another 3 to 5 billion francs at a time when they (UBS) are facing an uncertain economic environment and are working on fixing their capital structure would be irresponsible, the source said.

Key to UBS would be ensuring the deal is final and removes the risks of it facing future trials. A case involving Raoul Weil, UBS' former head of wealth management, is still open.

We have no doubt that this bilateral fight will be resolved, Swiss National Bank Chairman Jean-Pierre Roth said.

(Additional reporting by Ajay Kamalakaran in Bangalore; Editing by David Cowell)