WASHINGTON — The Bush administration, acting to avert the potential for major financial turmoil, announced Sunday that the federal government was taking control of mortgage giants Fannie Mae and Freddie Mac.

Officials announced that the executives and board of directors of both institutions had been replaced. Herb Allison, a former vice chairman of Merrill Lynch, was selected to head Fannie Mae, and David Moffett, a former vice chairman of US Bancorp, was picked to head Freddie Mac.

Treasury Secretary Henry Paulson says the historic actions were being taken because "Fannie Mae and Freddie Mac are so large and so interwoven in our financial system that a failure of either of them would cause great turmoil in our financial markets here at home and around the globe."

The huge potential liabilities facing each company, as a result of soaring mortgage defaults, could cost taxpayers tens of billions of dollars, but Paulson stressed that the financial impacts if the two companies had been allowed to fail would be far more serious.

"A failure would affect the ability of Americans to get home loans, auto loans and other consumer credit and business finance," Paulson said.

Both companies were placed into a government conservatorship that will be run by the Federal Housing Finance Agency, the new agency created by Congress this summer to regulate Fannie and Freddie.

The Federal Reserve and other federal banking regulators said in a joint statement Sunday that "a limited number of smaller institutions" have significant holdings of common or preferred stock shares in Fannie and Freddie, and that regulators were "prepared to work with these institutions to develop capital-restoration plans."

The two companies had nearly $36 billion in preferred shares outstanding as of June 30, according to filings with the Securities and Exchange Commission.

Paulson said that it would be up to Congress and the next president to figure out the two companies' ultimate structure.

"There is a consensus today ... that they cannot continue in their current form," he said.

Paulson and James Lockhart, director of the Federal Housing Finance Agency, stressed that their actions were designed to strengthen the role of the two mortgage giants in supporting the nation's housing market. Both companies do that by buying mortgage loans from banks and packaging those loans into securities that they either hold or sell to U.S. and foreign investors.

The companies own or guarantee about $5 trillion in home loans, about half the nation's total.

Lockhart said that both Fannie and Freddie would be allowed to increase the size of their holdings of mortgage-backed securities to bolster the housing industry as it undergoes its worst downturn in decades.

Lockhart said in order to conserve about $2 billion in capital the dividend payments on both common and preferred stock would be eliminated. He said that all lobbying activities of both companies would stop immediately. Both companies over the years made extensive efforts to lobby members of Congress in an effort to keep the benefits they enjoyed as government-sponsored enterprises.

Both Paulson and Lockhart were careful not to blame Daniel Mudd, the CEO of Fannie Mae, or Freddie Mac CEO Richard Syron for the companies' current problems. While both men are being removed as the top executives, they have been asked to remain for an unspecified period to help with the transition.