Fannie Mae and Freddie Mac have loosened rules that would have kept banks from approving new mortgages during the government shutdown

Fannie Mae and Freddie Mac are close to paying back the $188 billion in bailout funds the companies received when they were taken over by the federal government during the 2008 financial crisis, and American taxpayers could begin reaping profits on their investments in the two mortgage giants by early next year.

The companies will remit a total of $39 billon in dividends to the U.S. Treasury in December as a rejuvenated housing sector has helped both Fannie and Freddie -- the country's biggest providers of housing finance -- to reverse their losses.

"We are quickly approaching the point when taxpayers will receive a positive return on their investment in this company," Fannie Mae Chief Executive Tim Mayopoulos told reporters during a conference call, Reuters reported."That's obviously very good news for taxpayers."

Freddie Mac, in a statement on Thursday, said that it would deposit $30.4 billon to the Treasury as dividends in December, after the company posted record profits, aided by $23.9 billion in tax-related gains in the third quarter. With the December payment, Freddie would have paid the Treasury $9 million in excess of what it received during the bailout.

“Including the December dividend obligation, the company’s aggregate cash dividends paid to Treasury will total $71.345 billion, versus cumulative cash draws of $71.336 billion received from Treasury,” the company said.

Fannie Mae said it would pay $8.6 billion in dividends in December, taking its total repayment to $113.9 billion -- $2.2 billion short of the $116.1 billion it received from the U.S. government.

Both Fannie and Freddie are regulated by the Federal Housing Finance Agency after the government bailed out the companies during the 2008 financial crisis to save them from insolvency.

The original takeover deal was amended in 2012 by the government, and according to the new deal, both companies are required to pay most of their profits as dividend to the government, instead of an initial 10 percent dividend agreement. The deal also does not permit the companies to buy back the senior preferred stock held by the Treasury, placing the giants under continued government control.

Fannie and Freddie, which together own or guarantee more than 60 percent of all U.S. home loans, began earning profits in 2012 following a rebound in the housing sector, and repayments by the companies have helped the U.S. government bridge the deficit in the federal budget.

Freddie Mac has reported eight straight months of profit and the company expects strong earnings to continue in the foreseeable future. But, strong profits have spurred demands from minority shareholders to recast the companies as private firms. Shareholders and hedge funds have sued the companies and the government against the takeovers demanding compensation.

However, President Barack Obama, along with House Democrats and Republicans, has called for replacing the firms with a new financial system. A bipartisan bill in the Senate has called for government intervention in case of a crisis in the market, while a Republican bill in the House of Representatives proposes a private equity-based financial system.

"While I'm always glad when taxpayers see a return on investment, we can't forget that Fannie and Freddie wouldn't be earning one penny today without the government guaranteeing their transactions," Republican Senator Bob Corker said in a statement.

However, he added that "the private sector has been almost completely priced out of the business, and a hiccup in the economy could put taxpayers on the hook for another bailout. It is time to move to a modernized 21st-century housing finance system."

Observers also note that the hefty profits that are flowing into the government's coffers would prompt it to continue with the existing arrangement.

"You can have all the principles in the world, but with legislators flipping couch cushions looking for change, it's hard to shoot the two-headed monster that's spitting out $10 bills," Tim Rood, a former Fannie Mae executive who is now a partner at a Washington-based consulting firm, told USA Today.