A U.S. government agency that guarantees millions of mortgages has built up $6.1 billion in capital over the last year, erasing a shortfall experienced in 2013, when its reserves were so low that it had to draw taxpayer funds for the first time.

The Obama administration on Monday released an audit of the Federal Housing Administration that showed the net worth of the agency’s mortgage insurance fund rose to $4.8 billion at the end of September. At the same time last year, the fund was seen with value of negative $1.3 billion because of the risk that future obligations could outstrip income and assets.

The Department of Housing and Urban Development said the FHA had benefited from a drop in foreclosures and higher premiums charged to borrowers to cover the government mortgage insurance.

The housing bust that accompanied the 2007-09 recession hit the agency’s finances hard, leading it to take $1.7 billion from the Treasury last year.

“We have successfully weathered the storm,” said HUD Secretary Julian Castro.

Still, the fund’s capital ratio, which measures its net worth against its obligations, remains below the legal requirement, and the audit said it would not meet the minimum until 2016. Last year’s annual audit projected the fund would return to the legal minimum in 2015.

The FHA has taken a series of steps to improve its finances over the last few years. It has raised the amount it charges borrowers to insure mortgages against default and has tightened underwriting.

The agency insures more than a fifth of all new U.S. mortgages. It increased its share of the market when the housing bubble burst, more than tripling its loan portfolio, which is now valued at more than $1 trillion.

With an FHA-backed loan, buyers can put down as little as 3.5 percent of the purchase price. The FHA, which does not make loans, provides mortgage insurance to borrowers who are unable to make a large enough down payment to qualify for prime loans. (Reporting by Jason Lange; Editing by Lisa Von Ahn)