U.S. Treasury Secretary Timothy Geithner said on Wednesday the Obama administration was making headway in calming financial markets and would have a program to cleanse toxic assets from banks' balance sheets up and running by July.

Testifying to the Senate Banking Committee, Geithner said the U.S. financial system was starting to heal after a period of severe trauma, crediting an array of emergency government programs for helping ease a crisis sparked by a surge in mortgage defaults.

Geithner said, however, the outlook remained fragile and the administration had to be cautious about how it uses the dwindling money left in a $700 billion financial rescue fund Congress approved in October. He estimated about $123.7 billion remained.

We still face a very challenging economic and financial environment, and we need to be careful to preserve substantial resources and flexibility to deal with future contingencies, he said.

The financial crisis, the worst since the 1930s, has swept the globe and pushed the U.S. and other major economies into deep recession.

The administration has taken unprecedented steps to inject taxpayer capital into banks to try to foster lending and, in company with the U.S. central bank, to set up facilities for buying debt to keep the financial system liquid. This process has set up massive budget deficits that trouble lawmakers.

The top Republican on the panel, Senator Richard Shelby of Alabama, said there had been a massive waste of taxpayer dollars because the administration lacked a clear strategy for deploying rescue funds.

Geithner said the administration had no choice but to act aggressively to avoid a financial meltdown. He conceded, however, that winding down the government's deep involvement in business was an important challenge ahead.

Crises this severe don't burn themselves out. To fix them requires the action of government, he said, adding it was too soon to lay out a plan for withdrawing the government's unusual support for private firms.

I'm not prepared to talk to that today, he said. We're not quite there yet.

SMALL BANKS TO GET AID

Geithner said financial companies were adjusting their operations in ways that will make them less vulnerable to shocks like the one they have gone through.

Leverage has declined, the most vulnerable parts of the non-bank financial system no longer pose the same risk, and banks are funding themselves more conservatively, he said.

While public attention has largely centered on big banks, including the 19 that underwent stress tests to see whether they needed to raise more capital, Geithner said small banks also will get an expanded chance to qualify for taxpayer aid.

He said these companies would now have six months to make themselves into bank holding companies that would qualify for aid, or to reapply for aid if they are already eligible.

Geithner said a plan to entice private investors to buy distressed assets from banks by putting up government capital alongside private money -- a cornerstone of the administration's financial rescue plans -- would soon be ready. We expect these programs to begin operating over the next six weeks, he said.

Geithner said a presidential task force set up to deal with the collapsing U.S. auto industry would keep working with General Motors Corp right up until a June 1 deadline the government has set for the automaker to come up with a viable long-term business plan. GM may need to enter bankruptcy to restructure, as the Chrysler Corp already has done.

Geithner said the Obama administration would ensure that financing remains available for remaining creditworthy auto dealers and also will try to boost demand for new cars.

(Additional reporting by David Lawder and Corbett B. Daly; Editing by Neil Stempleman)