WASHINGTON — Mortgage giant Freddie Mac reported net income of $1.7 billion for the second quarter, up from the same period of 2016.

The government-controlled company said Tuesday its earnings were boosted by increased income from fees paid by lenders for guaranteeing mortgages in the April-through-June period.

Freddie, based in McLean, Virginia, will pay a dividend of $2 billion to the U.S. Treasury next month. Freddie will have paid a total $110.2 billion in dividends, exceeding its government bailout of $71 billion.

The government rescued Freddie and larger sibling Fannie Mae at the height of the financial crisis in September 2008, after they suffered huge losses from risky mortgages in the housing market bust.

Together the companies received taxpayer aid totaling about $187 billion. The housing market’s gradual recovery, helped by record-low interest rates spurring home purchases, has made Freddie and Fannie profitable again.

Still, the housing market’s revival has been choppy, and it has lagged behind the rest of the economy. Despite the low borrowing rates that could lure prospective homebuyers, the market has remained hampered by tight mortgage credit, rising home prices and stagnating incomes.

With the economy on solid footing and unemployment at healthy levels, the Federal Reserve had been in a campaign earlier this year to gradually raise interest rates from ultra-lows. But the Fed took a pause starting in May, keeping its key short-term rate unchanged — after having raised it in March for the second time in three months. Last week the Fed said that it’s keeping its the rate steady at a time when inflation remains undesirably low despite the job market continuing to strengthen.

Freddie’s second-quarter profit marked an increase from the $993 million it earned in the same period of 2016. The company said its income from lenders for guaranteeing mortgages increased to $158 million in the second quarter from $124 million a year earlier.

Freddie and Fannie own or guarantee about half of all U.S. mortgages, worth about $5 trillion. Along with other federal agencies, they back roughly 90 percent of new home loans.

The two companies 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.

Treasury Secretary Steven Mnuchin has said that privatizing Fannie and Freddie, cutting them loose from government control, is a priority of the Trump administration. But Congress hasn’t yet moved on legislation to overhaul the mortgage giants.