Fannie Mae (OTC: FNMA), the government-controlled mortgage giant that was brought to its knees during the housing crisis, reported first-quarter net income of $2.7 billion as home prices declined at a slower rate than in the previous quarter and its book of business improved.

As a result, the mortgage backer won't require financial aid from the Treasury for the first time since the financial crisis began. Under the terms of the 2008 government takeover of Fannie and Freddie Mac, both companies must pay a 10 percent dividend on preferred shares each quarter. In the first quarter, Fannie's comprehensive income of $3.1 billion will cover its dividend payment of $2.8 billion. Fannie has required $116.1 billion from the U.S. Treasury since the government takeover in 2008.

Washington, D.C.-based Fannie's earnings improved from the $6.5 billion net loss in the year-earlier quarter and a $2.4 billion loss in the fourth quarter. Credit-related expenses fell by two thirds as Fannie was about to sell real estate owned (REO) properties for better prices and mortgage delinquency rates dropped, the company said.

“Today’s results exemplify the tremendous progress we have made since 2009,” said Michael Williams, president and CEO of Fannie. “Our financial performance has improved significantly, and we successfully limited losses on the legacy book of business through our efforts to help homeowners avoid foreclosure.

Fannie said stronger mortgages tied to post-crisis loans now account for 56 percent of its single-family guarantees. It guarantees about half of new single-family mortgage securities, which it buys from banks and lenders, but it does not originate loans. The company said it bought and guaranteed about $221 billion in loans in the first quarter, financing about 934,000 single-family home mortgages and 117,000 multifamily units.

Fannie's stock, which is traded off-market, rose 8.57 percent to 28.5 cents in Wednesday trading.