Nearly five years after getting the biggest federal bailout in American history, finance giant Fannie Mae said Thursday it would pay the U.S. government a $59.4 billion dividend. While the company in 2008 took $116.1 billion in public funds to cover losses on trillions of dollars of mortgages it had purchased or guaranteed, the latest payout will bring the total dividends it has paid to the Treasury to $95 billion.

Fannie Mae’s announcement comes after the mortgage association reported an $8.1 billion profit for the January-March period, the best performance in its history, compared with a $2.7 billion profit a year earlier, in a sign of the housing market recovery.

As the value of the mortgages it owns or backs has increased, Fannie Mae's bottom line has improved. Last month, the company reported a record $17.2 billion annual profit for 2012.

“As a result of actions to strengthen its financial performance and continued improvement in the housing market, Fannie Mae’s financial results have improved significantly over the past five quarters,” the company said in a statement.

While the dividend payments do not pay down what Fannie Mae owes, the money does offset the cost of the rescue and could help delay the federal government's next debt-ceiling hike.

Sibling housing-finance firm Freddie Mac, also seized in 2008, has seen its finances rebound too; as of Wednesday, the company reported a $4.6 billion Q1 profit, the second best in its history.

Freddie Mac said it would pay $7 billion in required dividends to the Treasury next month and could make a larger payment based on its own recalculation of tax write-downs.

Freddie Mac has received about $72 billion in bailout money and with the upcoming dividend payment will have sent about $37 billion back to taxpayers.