Mortgage finance giants Fannie Mae and Freddie Mac will pay the federal government $10.2 billion more in dividends for their 2008 rescue after both firms reported first-quarter profits Thursday.

With the payments, the companies will have sent $213.1 billion in dividends to the Treasury. The amount more than offsets the $187.5 billion that was pumped into Fannie Mae and Freddie Mac to keep them from failing after the housing market crash and financial crisis.

------------

FOR THE RECORD

An earlier version of this post said Fannie Mae and Freddie Mac received $187.5 from the Treasury. The companies received $187.5 billion.

------------

Under terms of the bailout, the dividend payments do not reduce the amount of money the companies owe to taxpayers.

But as the housing market has rebounded, Fannie Mae and Freddie Mac have returned to profitability and been able to send large checks to the federal government every three months.

Still, the Senate and House are considering legislation to shut down Fannie and Freddie as part of an overhaul of the housing finance system.

Fannie Mae posted a $5.3-billion profit for the first three months of the year, down from $6.5 billion in the fourth quarter of 2013.

The company will pay $5.7 billion in dividends to the Treasury, bringing its total to $126.8 billion. Fannie Mae received $116.1 billion in taxpayer money.

The first-quarter profit, the company's ninth straight, was boosted significantly by $4.1 billion in settlements of lawsuits with banks related to bad mortgages the firm guaranteed during the subprime housing boom.

Fannie Mae Chief Executive Timothy J. Mayopoulos said Thursday that the company expected to remain profitable "for the foreseeable future."

"We expect our annual earnings to remain strong over the next few years but substantially lower than what we experienced in 2013," he said. Fannie posted a record $84 billion in profit last year.

The housing market has slowed and home prices are expected to increase only modestly this year. Mayopoulos noted that prices rose 8.5% in 2013 but just 0.4% in the first quarter.

"We do expect home price growth to continue, but the rate will be lower nationally," he said.

Freddie Mac reported a $4-billion first-quarter profit Thursday, down from $8.6 billion in the fourth quarter. It was the company's 10th straight quarterly profit.

Legal settlements of $4.5 billion helped the company stay profitable.

Based on those profits, Freddie Mac will pay the federal government $4.5 billion in dividends. The payment will bring the total paid to $86.3 billion in exchange for $72.3 billion in bailout funds.