A key senator said Thursday that lawmakers might be able to reform Fannie Mae and Freddie Mac this year, citing a forming consensus among outside groups.

"I truly believe we're going to be able to pass a piece of legislation this year," said Bob Corker, a Tennessee Republican, speaking at a Senate Banking Committee hearing on the topic.

The two government-sponsored enterprises have remained in the government's hands since being bailed out during the housing crisis in 2008. Since then, legislation has fallen short, including a bipartisan 2014 effort led partly by Corker.

The head of the Banking Committee, Mike Crapo of Idaho, has aimed for a bipartisan reform to the housing finance system. Fannie and Freddie are the key to the current system, buying mortgages from lenders and packaging them into securities to be sold to investors with a guarantee to cover them if the loans go bad. Among Fannie, Freddie and the Federal Housing Administration, the government backs the majority of new home loans.

Past legislative efforts have failed because of disagreements over whether and how Fannie and Freddie should be replaced and the role of government in backstopping mortgages and subsidizing housing.

But on Thursday Corker cited "a real consolidation of ideas" in recent months among think tanks and industry groups.

The agreement, he said, includes that there should be explicit government support for mortgage securities, an idea opposed by many conservatives.

"There will be people on my side of the aisle that that will be a tough one to get to," Corker acknowledged.

Last week, the conservative chairman of the House Financial Services Committee, Rep. Jeb Hensarling of Texas, told a group of mortgage bankers that the best path remains his own 2013 legislation that would have ended Fannie and Freddie and replaced them with a public utility that would not involve a government guarantee.