After five years in government hands, the mortgage buyers Fannie Mae and Freddie Mac are facing major changes in Congress.

Lawmakers in both the Senate and House want to wind down the two government-sponsored enterprises that failed in fall 2008, almost dragging the economy down with them before being bailed out with almost $200 billion in taxpayer funds.

Any attempted changes to their status would face fierce lobbying by banks and other companies in the mortgage industry, and will face a tricky path through a Congress that is divided on the role of the government in housing finance. But there are signs that lawmakers are getting serious about trying to address the issue.

On Thursday, House Financial Services Committee Chairman Jeb Hensarling released a proposal to wind down the GSEs and leave their functions to the private market. The plan would phase out Fannie Mae and Freddie Mac in five years and scale down the Federal Housing Administration's presence in the mortgage insurance business. The measure would create a new agency to oversee private-sector securitization of mortgages, but the agency wouldn't have any involvement in creating, servicing or guaranteeing them. The key feature of the bill is that it would remove the government backstop for mortgage-backed securities.

That's an important goal for many conservative lawmakers who believe that Fannie and Freddie played a key role in creating the housing bubble as well as the financial panic of late 2008. Rep. Scott Garrett, a New Jersey Republican who serves on the House Financial Services Committee, called "the government's misguided efforts at allocating mortgage credit through Fannie Mae and Freddie Mac" the "core cause" of the financial crisis, and said that the bill "will finally end the largest bailout in history and will put our country back on a path to a sustainable housing finance market."

Others believe that government guarantees play a key role in supporting a liquid secondary market in mortgage securities. In late June, a bipartisan group of eight members of the Senate Banking Committee rolled out a plan that would bring an end to Fannie and Freddie while retaining a federal backstop for privately issued mortgages. The plan, spearheaded by Bob Corker, R-Tenn., and Mark Warner, D-Va., would replace Fannie and Freddie with an agency modeled after the Federal Deposit Insurance Corp. The agency would collect premiums from companies to pay out insurance claims on losses on mortgage securities.

Separately, the chairman of the Senate Banking Committee, Tim Johnson, D-S.D., and his Republican counterpart, Mike Crapo of Idaho, announced Thursday that they had reached an agreement on a bill to address the finances of the FHA as a first step toward comprehensive housing finance reform. Earlier this year, the Obama administration said that the FHA, which insures more than $1 trillion in mortgages, could need nearly $1 billion from the Treasury later this year to avoid insolvency. Others have estimated far larger shortfalls for the FHA. The American Enterprise Institute's Ed Pinto, a former executive vice president for Fannie Mae, has pegged the FHA's net worth at negative $27.22 billion by generally accepted accounting principles.

Johnson and Crapo did not include any details about their plans for fixing the FHA's finances, saying they would introduce legislation next week. Nor did either senator provide an indication of their plans for reforming housing finance.

Currently, the GSEs and the FHA together guarantee more than 85 percent of mortgage originations and were responsible for more than 99 percent of mortgage originations in 2012, according to the House Financial Services Committee. It's not clear to what extent private investors would be able to support a market for mortgage securities, especially the traditional 30-year fixed-rate mortgage.

For that reason, representatives of the secondary mortgage market industry are more likely to be receptive to the bipartisan Senate bill than to Hensarling's. Hensarling dismissed the housing industry's preferences to Politico, saying that "we need a policy that is principally designed for taxpayers and homeowners."

The lack of a federal role in backstopping mortgage securitization in the House bill would make it hard to reconcile with any legislation coming out of the Senate Banking Committee.

President Obama's position on the GSEs and housing finance is another question. In 2011, Obama's Treasury Department released a report including three options for replacing Fannie and Freddie, ranging from a mostly privatized market along the lines of what House conservatives favor to a system in which the government would offer reinsurance for privately originated mortgage securities. The White House has not, however, put its weight behind major changes to the housing finance market.