Fannie said Thursday it will pay a dividend of $10.2 billion to the U.S. Treasury next month. It made no request for additional federal aid.
The company said the rise in home prices during the quarter enabled it to reduce its reserves set aside for losses on mortgages, helping boost its net income.
The earnings for April through June period compared with net income of $5.1 billion in the second quarter of 2012.
The government rescued Fannie and smaller sibling Freddie Mac during the financial crisis after both incurred massive losses on risky mortgages. The companies received loans totalling about $187 billion.
Washington-based Fannie said it expects to remain profitable "for the foreseeable future."
Once the second-quarter dividend is paid, Washington-based Fannie will have repaid $105 billion of the roughly $116 billion it received from taxpayers.
The latest quarterly gain followed a record $58.7 billion net income in the first quarter, when Fannie capitalized on tax benefits it had saved from its losses on loans during the crisis. It paid a first-quarter dividend of $59.4 billion to the Treasury.
The housing recovery that began last year has made Fannie and Freddie profitable again. Together they will have paid back next month about $146 billion of their government loans. Those payments are helping make this year's federal budget deficit the smallest since President Barack Obama took office in 2009.
Fannie and Freddie own or guarantee about half of all U.S. mortgages, worth about $5 trillion. Along with other federal agencies, they back roughly 90 per cent of new mortgages.
Fannie and Freddie 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 and exert influence over the housing market.
Freddie, meanwhile, reported Wednesday that it earned $5 billion in the April-June period, its seventh straight profitable quarter. It will pay a dividend of $4.4 billion to the Treasury. And the company said it has $28.6 billion of the sort of tax benefits that Fannie applied in the first quarter. Freddie said it will consider tapping all or a portion of that amount in coming quarters.
The two companies reported solid quarterly earnings the same week that Obama proposed a broad overhaul of the U.S. mortgage finance system — including winding down Fannie and Freddie. He declared that taxpayers should never again be left "holding the bag" for the mortgage giants' risky moves.
Obama wants to replace them with a system that would put the private sector, not the government, primarily at risk for the loans. The government would still be involved, both in oversight and as a last-resort loan guarantor. Obama also wants a guarantee that private lenders will make sure homeowners have access to 30-year fixed mortgages.
A fix to the housing finance system is unlikely to be easy, however. Obama's plan is in line with bipartisan Senate legislation. But most House Republicans want the market almost completely privatized, while many Democrats insist on government having a larger role.