UBS is the largest bank in a famously secretive system
The US government and Swiss bank UBS have reached an "agreement in principle" in their dispute over tax evasion by US customers.
US Justice Department attorney Stuart Gibson told a federal judge the two parties agreed on the "major issues".
The court case scheduled to begin next Monday will now be postponed.
The US had accused UBS of violating US laws and insisted the Swiss bank reveal the names of US clients who had set up Swiss accounts to evade tax.
UBS shares in New York rallied 6.1% on the news.
"The share price going up kind of tells you that a settlement would be a big step for UBS," said Teresa Nielsen at Ventobel.
But she cautioned that the bank's reputation will not recover overnight.
"If the tax issues finally come off the table, there is a basis to rebuild client inflows, but it will take some time," said Ms Nielson.
The deal looks set to end a stand-off that has lasted months.
The US Justice Department has been seeking the names of more than 50,000 US customers with Swiss accounts.
But UBS maintained that divulging the names would violate Swiss bank secrecy laws.
In February, UBS admitted to US tax fraud and agreed to pay $780m (£467m) as part of a provisional deal to settle charges that it helped thousands of US clients use Swiss bank accounts to evade taxes.
But US officials argued this was not enough, and asked for the identities of all such account holders.