Swiss banking giant UBS AG agreed Wednesday to turn over to the IRS the details of 4,450 accounts suspected of holding undeclared assets by American customers, ending an intense trans-Atlantic legal fight. IRS Commissioner Doug Shulman said the accounts held $18 billion in assets at one time. Many have since been closed, he said. The deal will give the Internal Revenue Service thousands of long-sought account names, and is expected to provide even more UBS clients who voluntarily disclose their financial details to the agency, Shulman said. UBS has an estimated 52,000 accounts of US customers. The IRS chief said the 4,450 accounts being relinquished to the agency were the ones most suspected of containing undeclared assets. "I believe this agreement gives us what we wanted - access to information about those UBS accountholders most likely to have been involved in offshore tax evasion," Shulman said. He said that other account holders appear to be in compliance with US tax laws. The two sides told a federal judge last week they had reached a tentative agreement, but the details were not released until Wednesday. Account holders will be notified before their names are released to the IRS. They will then have the ability to repeal their release before Switzerland's Federal Administrative Court. The process is expected to take several months, IRS officials said. Shulman said the Swiss government has assured US authorities that the release of the names conforms with both Swiss banking laws and the tax treaty signed by both countries. Shulman said the IRS reserves the right to resume its legal fight if any of the names are withheld. "This issue is not going away, and people hiding assets and income offshore will find themselves increasingly at risk due to our efforts in this area," Shulman said. The Swiss Bankers Association issued a statement in support of the agreement. "The out-of-court agreement avoids a prolonged legal battle that would have had an uncertain outcome and UBS can now continue with its consolidation process in an atmosphere free of this legal uncertainty," the association said. Swiss Justice Minister Eveline Widmer-Schlumpf told a news conference in the capital of Bern that the deal lifts the threat of criminal prosecution against UBS, which could have endangered the bank's very existence and dealt a severe blow to the Alpine nation's economy. "There was no alternative to this solution," she said. Asked if other Swiss banks could be targeted for future prosecution in the United States, she said: "We don't expect this to be the case." UBS Chairman Kaspar Villiger said, "I am confident that the agreement will allow the bank to continue moving forward to rebuild its reputation through solid performance and client service."