WASHINGTON — Conflicting missions to promote affordable housing and generate profits for shareholders led to a crisis at mortgage-finance titan Fannie Mae and to an eventual government takeover, former Chief Executive Daniel Mudd said Friday.

Testifying before the Financial Crisis Inquiry Commission, set up by Congress to determine the causes of the nation’s deep crisis, Mudd said that his quasi-government mortgage finance agency, put in government conservatorship in September 2008, had a flawed structure that worked well when home prices were rising, but proved problematic when home values collapsed by more than 30 percent.

When the market started turning south, he said, Fannie Mae couldn’t put its mission on hold, nor could it bet against its own market as Goldman Sachs and other Wall Street firms did.

When home prices collapsed, Fannie Mae and Freddie Mac, which purchased mortgages originated and underwritten by others, found themselves with all their eggs in one basket, unable to diversify or minimize the risks they faced.

“The lack of diversification left (Fannie Mae and Freddie Mac) exclusively exposed to the one market that cratered the worst,” Mudd told the commission, which must issue a report in mid-December on the causes of the financial crisis.

Fannie Mae, or the Federal National Mortgage Association, and Freddie Mac, or the Federal Home Loan Mortgage Corp., don’t actually make loans. Instead, they purchase pools of mortgages, called mortgage-backed securities. The pools of loans are bundled together for sale to investors as bonds, and monthly mortgage payments become the income stream for investors. Fannie Mae and Freddie Mac own or back about 50 percent of the nation’s $11 trillion in home mortgages.

From about 2000 forward, Wall Street aggressively began competing with Fannie Mae and Freddie Mac, taking a big chunk of their market share, in part through creative and ultimately unsustainable subprime and similar loans to borrowers with the weakest credit.

Until about 2002, subprime lending involved fixed-rate mortgages and enjoyed low default rates, former Federal Reserve Chairman Alan Greenspan testified on Wednesday.

The real change came as Wall Street began packaging loans that had adjustable rates, with low initial rates, called teaser rates, which gave borrowers the impression they had an affordable loan. Even these loans were sustainable until interest rates began rising and these mortgages began adjusting to higher rates, resulting in considerably larger monthly payments for borrowers and increasing defaults.

Many Republicans blame the organizations’ purchase of these pools of loans as a trigger for the bad lending that occurred in the housing market. Mudd and Robert Levin, the former chief business officer of Fannie Mae, said, however, that Fannie Mae had tighter standards than the private sector did.

The real problem, Mudd said, was a breakdown in underwriting standards at the start of this chain of mortgage finance, particularly in large states with high housing prices and huge home-price appreciation — namely California and Florida — that allowed “a lot of leakage into the system of loans that were not a higher quality,” Mudd said.