Congress' top budget analyst says a federal rescue of troubled mortgage giants Fannie Mae and Freddie Mac could cost taxpayers as much as $25 billion.

But Peter R. Orszag, director of the Congressional Budget Office, predicted in a letter to lawmakers Tuesday that there's a better than 50 percent chance the government will not have to step in to prop up the companies by lending them money or buying stock.

Congress is expected to vote this week on a housing measure that includes Treasury Department authority to throw Fannie and Freddie a temporary lifeline.

Treasury Secretary Henry M. Paulson, who has been pressing for the power, says the backup plan will help calm investors and stabilize financial markets.