UBS AG now says it had about 47,000 accounts held by Americans who didn't pay U.S. taxes on their assets, but Switzerland's biggest bank isn't providing the names of any more of them to the U.S. government.

A Justice Department official said if UBS is found in contempt by a federal judge for refusing to identify the rest of its U.S. clients, the government could proceed with its criminal prosecution of the bank, which has been deferred.

UBS official Mark Branson confirmed the figure of 47,000 accounts as of Sept. 30, at a Senate hearing Wednesday that explored the fight over secrecy and alleged tax evasion.

UBS has accepted responsibility for helping Americans hide assets from the U.S. government and turned over the names of about 300 U.S. clients. But the bank is not giving the Internal Revenue Service the names of all U.S. citizens who maintained secret accounts with the bank.

Branson said nearly all the accounts have been closed and that the bank "has now done all that it can do to cooperate" with the IRS request.

"UBS cannot disclose information to the IRS that would put its employees at serious risk of criminal prosecution under Swiss law," said Branson, who is the chief financial officer of the bank's global wealth management and Swiss bank division in Zurich.

Sen. Carl Levin, D-Mich., chairman of a Senate investigative subcommittee, said that despite UBS "being caught red-handed," the Swiss government is fighting the IRS request and defending the country's banking secrecy.

The conduct that UBS engaged in, including tricks to thwart the IRS from tracing Americans' funds in Switzerland, "actively facilitates tax evasion (and) amounts to a declaration of war by offshore secrecy jurisdictions against honest, hardworking taxpayers," Levin said at the hearing by the panel of the Senate Homeland Security and Governmental Affairs Committee.

"We cannot allow an environment to develop where wealthy individuals can go offshore and avoid paying taxes with impunity," said IRS Commissioner Douglas Shulman.

The Obama administration is "committed to taking aggressive action on offshore tax abuse," Shulman testified.

UBS, meanwhile, announced that former Swiss President Kaspar Villiger will replace Peter Kurer as chairman of the bank's board next month in an effort to restore its profitability and deal with the growing controversy over the U.S. tax issue.

In a cross-border battle, the IRS has been trying to pry from UBS the names of wealthy Americans who maintain secret accounts with the bank. UBS maintains that turning over the account names would violate Swiss privacy law and jeopardize its license to stay in business.

The Swiss government — which is providing financial support to UBS as it struggles with massive losses stemming from the U.S. subprime mortgage crisis — refused to send a representative to Wednesday's subcommittee hearing in protest of the IRS lawsuit against the bank.

Cloak-and-dagger tactics the U.S. government said were employed by UBS — coded language in internal e-mails and memos, foreign shell companies and phony charitable trusts, use of pay phones and foreign area codes and credit cards — were on display at Wednesday's hearing.

UBS allegedly staged training sessions so that "client advisers" could travel frequently to the U.S. — on average 30 days a year each — to consult with secret U.S. customers without attracting the attention of tax agents or law enforcement officials. The advisers were told to rotate the hotels they stayed in and to "protect the banking secrecy" if they were questioned by any authorities, according to excerpts of UBS internal documents filed in the IRS suit and provided by the subcommittee.

The dispute has prompted heated debate in Switzerland over the country's cherished banking secrecy, a tradition that has helped transform the nation into one of the world's richest.

UBS on Feb. 18 agreed to pay $780 million in fines and restitution for conspiring to help American citizens violate their country's tax laws by hiding assets — estimated to be worth at least $14.8 billion — from the U.S. government. In the deal struck in federal court in Fort Lauderdale, Fla., the Justice Department agreed to defer criminal prosecution of UBS in exchange for the payment of fines and restitution, and the names of up to 300 U.S. clients.

The bank says it has shut down the improper foreign-account business, and taken corrective measures to tighten its compliance and internal control systems.

The agreement didn't cover the much broader list of as many as 52,000 customer names now sought by the IRS, but both sides knew the U.S. government would ask for them.

In its civil suit against UBS, the IRS has asked a federal judge to enforce so-called "John Doe summonses" seeking information about the Americans' accounts. Another federal judge approved the summonses in July 2008, but UBS never complied.

By providing the 300 or so names, Branson said in his testimony that UBS has complied with the summonses as fully as it can without violating Swiss law.

If UBS fails to meet the conditions of the deferred prosecution, the government may proceed against it, said John DiCicco, acting assistant attorney general in the Justice Department's tax division.

The hearing was the latest in an extensive series by the Senate panel examining offshore tax abuse, which is estimated to cost the U.S. $100 billion a year in lost tax revenue.

Recovering tax revenue has taken on amplified urgency amid the economic crisis, when the federal deficit is expected to balloon to about $1.7 trillion, or nearly four times the highest level in history as hundreds of billions of dollars are spent on the bailout for financial institutions and the economic stimulus plan.

On Tuesday, Treasury Secretary Timothy Geithner said President Barack Obama supported legislation authored by Levin that would tighten U.S. tax laws and close loopholes to fight offshore tax-haven abuses.