WASHINGTON (Reuters) - Fannie Mae and Freddie Mac may have to retain billions of dollars in profits rather than turn them over to the U.S. Treasury, the regulator for the companies said on Wednesday as he contemplated how to avoid a fresh taxpayer bailout.

Melvin Watt, the supervisor for Fannie and Freddie, said such a move would be aimed at soothing investor jitters. Markets could be rattled if it seemed the housing finance companies needed more government support, Watt said in congressional testimony obtained by Reuters.

Having Fannie and Freddie tap taxpayers for more financial support “could stifle liquidity in the mortgage-backed securities market and could increase the cost of mortgage credit for borrowers,” Watt said in prepared testimony to the Senate Banking Committee.

Fannie and Freddie once were investor-owned companies with a mandate to promote home ownership. But losses grew as the 2008 housing crisis took hold and the Treasury injected taxpayer cash to keep the companies afloat.

The $188 billion government investment has yielded nearly $266 billion in returns for taxpayers. But the companies are now left with little wealth of their own, Watt said.

By the end of the year “neither enterprise will have the ability to weather any loss it experiences in any quarter without drawing further on taxpayer support,” he said.

Watt, director of the Federal Housing Finance Agency (FHFA), could order Fannie and Freddie to retain future profits as a way to shore up the companies’ accounts.

“We cannot risk the loss of investor confidence,” he said. “FHFA’s actions would be taken solely to avoid a draw during conservatorship.”

Treasury Secretary Steve Mnuchin has said Fannie and Freddie cannot be left in their current state for the next four years.

Earlier this week, Boston Fed President Eric Rosengren warned that lawmakers could upend the mortgage market if they were not careful with reform.

Senators are likely to discuss reform plans at Thursday’s hearing.