NEW YORK (CNNMoney.com) -- A House committee trying to uncover the roots of the credit crisis on Tuesday grilled several former CEOs of mortgage finance giants Fannie Mae and Freddie Mac.

Members of the House Oversight Committee called into question documents from both firms that suggested executives took the companies down the risky and potentially disastrous road of buying huge amounts of subprime and other risky home loans.

"The companies made irresponsible investments that are now costing federal taxpayers hundreds of billions of dollars," said Rep. Henry Waxman, D-Calif., committee chairman. "Their own risk managers raised warning after warning about the dangers of investing heavily in the subprime and alternative mortgage market. But these warnings were ignored."

The panel heard from former Fannie chief executives Daniel Mudd and Franklin Raines; former Freddie Mac CEOs Richard Syron and Leland Brendsel; a former Fannie Mae chief credit officer.

Fannie and Freddie, publicly traded but federally backed companies, control or guarantee about $5 trillion in mortgage loans. They purchase large amounts of home loans, bundle them together and divide them into securities that can be sold to investors.

The companies, which were taken under federal control in September, have drawn criticism for taking on too much risk, exacerbating the credit crisis when the housing market declined.

"Fannie and Freddie had a role or a primary role in this crisis," said Rep. Darrell Issa, R-Calif. "They gave people home ownership without telling them their personal dream could become their personal nightmare."

Lawmakers repeatedly referred to a 2005 Fannie Mae memo outlining future corporate strategy. The document acknowledged that more private investors were investing in risky loans, and it spelled out the potential consequences of taking on that risk.

"The risk in the environment has accelerated dramatically," the document stated.

The document laid out Fannie's options. If it stayed the course, the company would "maintain our strong credit discipline." But if it met the market, the company would "accept higher risk and higher volatility of earnings" and could face "higher credit losses" and "increased exposure to unknown risks."

Waxman said the document shows that Fannie executives made unwise decisions. But he also put blame on lenders, who he said started the fire.

"The CEOs of Fannie and Freddie made reckless bets that led to the downfall of their companies," Waxman said. "But it is a myth to say they were the originators of the subprime crisis. Fundamentally, they were following the market, not leading it."

GSEs only performing their function

Some of the CEOs at the hearing argued that their actions may have added fuel to the fire, but they weren't the originators of the risky loan market.

Syron, CEO of Freddie Mac from 2003 until September 2008, said Fannie and Freddie had to enter the non-traditional part of the market as the private lending sector shifted toward those kinds of mortgages.

"It is not at all surprising that these two firms would get hit hard by the biggest housing collapse in 75 years," said Syron. "If you are going to take the mission of promoting low-income lending seriously, then you are, by definition, going to take on a somewhat greater level of risk."

Raines, the chief executive of Fannie Mae from 1999 to 2004, said the roots of the credit crisis were in place long before the government sponsored enterprises, or GSEs, began buying up risky loans.

"Fannie Mae did not cause the current crisis," said Raines. "If anything, Fannie Mae played catch-up to the banks and investment banks who drove the securitization of the most toxic subprime mortgages."

Raines said that while Fannie and Freddie hold some responsibility for not appropriately managing their own credit risk, regulators must share in the blame. He argued that government officials -- he named the Federal Reserve, Federal Trade Commission, Department of Housing and Urban Development, among others -- were asleep at the switch. The regulators, he said, failed to use their authority to put a stop to extremely dangerous lending practices.

"While regulations did not force financial institutions to make bad loans, the absence of consumer protection regulation allowed many bad loans to be made to the detriment of consumers," he said.

Critical role in market

Fannie and Freddie serve a crucial role in keeping the housing market liquid, giving banks and lenders the ability to sell the loans they make in order to have the funds to make additional loans to consumers.

But the companies, trying to meet the competing interests of the greater market and their shareholders, began to buy up risky subprime and Alt-A loans, which were generally made without income verification. When the housing bubble burst last year, the firms began rapidly losing money and eventually became unsustainable without government intervention.

As a result, the Treasury Department took over control of Fannie Mae (FNM, Fortune 500) and Freddie Mac (FRE, Fortune 500) on Sept. 7, placing the firms in a conservatorship after it concluded the firms were facing rising losses from mortgage-backed securities.

The CEOs said they had differing views of what role Fannie and Freddie should serve in the home loan finance market going forward.

Daniel Mudd, chief executive of Fannie Mae from 2005 to 2008 suggested the companies be taken fully private or fully public.

"I would advocate moving GSEs out of No Man's Land," said Mudd. "Events have shown how difficult it is to balance financial, capital, market, housing, shareholder, bondholder, homeowner, private, and public interests in a crisis of these proportions."

Syron, however, said Fannie and Freddie should maintain their traditional status, but he advocated for reforms to allow the companies to remain solvent when the government ends its conservatorship.

"If you want to have long-term fixed rate mortgages, you need to have some mechanism like GSEs," said Syron. "But it is worth doing very thorough examination of the enterprises, examining their benefit to the market."

Leland Brendsel, Freddie Mac CEO from 1985 to 2003, said the most important action Congress can take - more pressing than GSE reform - is minimizing home foreclosures.

Nearly 1 million homes have been lost to foreclosure since the housing crisis hit in August 2007, and the trend continues unabated.

"We need to take action to reduce home foreclosures," said Brendsel. "They have a cascading effect on home prices by dumping of homes on real estate market."