Activist investor Bill Ackman's company has disclosed stakes in government-controlled mortgage giants Fannie Mae and Freddie Mac, the U.S. federal housing agencies that had to be bailed out by the government in 2008.

In regulatory filings on Friday, Pershing Square Capital Management LP said that it has a 9.98 per cent stake in Fannie Mae and a 9.77 per cent stake in Freddie Mac.

Earlier this month Fannie Mae and Freddie Mac reported strong third-quarter earnings as the U.S. housing market continues to recover. The government rescued Fannie and Freddie at the height of the financial crisis in September 2008 when both veered toward collapse under the weight of losses on risky mortgages. Together the companies received taxpayer aid totalling $187 billion US.

The gradual recovery of the housing market has made Fannie and Freddie profitable again. Their repayments of the government loans have helped make this year's federal budget deficit the smallest in five years.

Agencies guarantee mortgages

The two companies don't directly make loans to borrowers. They buy mortgages from lenders, package them as bonds, guarantee them against default and sell them to investors. That helps make loans available.

Ackman's disclosure came two days after another investment firm, Fairholme Capital Management, offered to buy Fannie and Freddie's core businesses from the government in a $52-billion deal.

Miami-based Fairholme, led by Bruce Berkowitz, made the proposal to the Federal Housing Finance Agency, which oversees Fannie and Freddie.

Fairholme said it would lead a group of investors to buy the mortgage-bond guarantee businesses of the two companies. The firm said that would be sufficient to back about $1 trillion in new mortgages.

President wants to move risk to private hands

The Obama administration is seeking to wind down Fannie and Freddie.

The goal of the Obama plan is to replace Fannie and Freddie with a system that would put the private sector, not the government, primarily at risk for the loans. That would spread the risk over numerous companies. The government would still be involved, both in oversight and as a last-resort loan guarantor. The White House also wants a guarantee that private lenders will make sure homeowners have access to 30-year fixed mortgages.

It's unclear whether the Fairholme proposal would fit with the administration's plan. Government officials have said previously that a small group of investment firms taking on such a large risk of mortgage defaults would open the possibility of the government having to bail out the firms if they failed.