Treasury Secretary Tim Geithner extends TARP.

WASHINGTON (CNNMoney.com) -- The controversial $700 billion federal bailout program will be extended through Oct. 3, 2010, Treasury Secretary Tim Geithner said Wednesday.

The Troubled Asset Relief Program will be scaled back and spending limited to newer programs aimed at stopping foreclosures, making loans to small businesses and propping up the credit markets to make loans more available.

"History suggests that exiting prematurely from policies designed to contain a financial crisis can significantly prolong an economic downturn," Geithner wrote in a letter to congressional leaders. "We must not waver in our resolve to ensure the stability of the financial system and to support the nascent recovery that the administration and the Congress have worked so hard to achieve."

Under the TARP law, the bailout program would have expired at the end of December if Geithner had not decided to extend it.

Geithner said that in the end he does not expect to spend more than $550 billion and that $175 billion will be repaid by the end of 2010.

His letter also includes a current accounting of TARP: The government expects to lose $42 billion of the $364 billion it disbursed in the 2009 fiscal year, which ended on Sept. 30.

While most observers had expected Geithner to extend the bailout, Republicans have been calling for it to be shut down and have filed legislation to end it.

"The Obama administration just can't seem to let go of the $700 billion in 'walking around money' taxpayers were forced to put on the line to bailout Wall Street last year," Rep. Jeb Hensarling, R-Texas, said in a statement Wednesday. "What was supposed to be an emergency capital injection to thaw frozen credit markets has morphed into a revolving bailout fund."

TARP was enacted in October 2008 after a few tight votes in Congress, including a House rejection that sparked the biggest one-day decline ever in the Dow Jones industrial average. Its signature provision allowed Treasury to pump capital into big and small banks in an effort to spur lending.

In a report released Wednesday, the bailout watchdog Congressional Oversight Panel said that TARP did prevent financial collapse but has not achieved other goals aimed at helping Main Street, like making loans more available or stemming foreclosures.

Geithner, in his letter, highlights programs that have been turned off or are being shut down. Among them: a program that backstopped money market funds and another that allowed Treasury to make direct investments in banks.

Of course, Geithner also said that Treasury reserves the right to spend new bailout funds in the event of another financial system emergency. "As a nation we must maintain capacity to respond to such a threat," he wrote.

Even President Obama acknowledged that TARP has struggled to win public confidence, in a speech on Tuesday, while calling for the unexpected savings from TARP to free up dollars to pay for new job-growth programs.

"There has rarely been a less loved or more necessary emergency program than TARP," Obama said. "Launched hastily under the last administration, the TARP program was flawed, and we have worked hard to correct those flaws and manage it properly."