Updated from 11:17 a.m. EDT

U.S. stocks continued to dive Wednesday after the

Federal Reserve

agreed to back and take over insurance giant

AIG

(AIG) - Get Report

.

The three major indices were down some 3% at midday. The

Dow Jones Industrial Average

fell 349 points to 10,710, and the

S&P 500

slumped 45 points to 1168. The Nasdaq stumbled 85 points to 2122.

On Tuesday, the major indices ended a volatile day with strong gains. A reported decision by the Federal Reserve to provide a loan package to AIG accompanied stocks' late move to the upside. During earlier trading that day, government officials had said they wouldn't provide a bailout package for the company.

After trading closed Tuesday, the

Fed

reversed its earlier decision and agreed to offer AIG an $85 billion bridge loan to bail out the company. In exchange, the government will essentially get a 79.9% equity position in AIG and will charge a hefty interest rate.

Treasury Secretary Henry Paulson also stipulated that AIG CEO Robert Willumstad resign. Edward Liddy, former CEO of

Allstate

(ALL) - Get Report

, will replace Willumstad.

"I think the problems at AIG are just so deep and so extensive that it was beyond the private sector to take care of it," said Maryann Hurley, vice president of fixed income trading at DA Davidson. After

Bank of America's

(BAC) - Get Report

acquisition of Countrywide and

Merrill Lynch

(MER)

, she said, the private sector would have a hard time swallowing AIG. The choice was to either bail out AIG or allow it to fail, which would have badly shaken the financial system, she said.

However, the AIG bailout doesn't mean the crisis is over. "It would be, I think, not prudent to believe that there aren't other problems out there," said Hurley.

"What the government is telling you is, if you're going to fail, fail massively," said Matthew Smith, vice president and portfolio manager at Smith Affiliated Capital. Smith said that unlike in previous market busts in 1987 and 2000, which were largely tied to stocks themselves, the current market downturn is based in derivatives contracts, making losses more difficult to recoup. In this environment, "If your money goes bust, it explodes like a firecracker," he said.

Smith said that now that the government has bought an insurance company, the question is what company will get bailed out next. "The moral hazard has just gone out the window at this point," he said. "You woke up this morning, and now you and I are the new owners of an insurance company. That's the scam that's being played here."

Earlier in the week, brokerage

Lehman Brothers

(LEH)

filed for bankruptcy and Bank of America staged a last-minute acquisition of Merrill Lynch. Fearing AIG may be next, investors sold the stock down 60% on Monday, then dropped it another 21% on Tuesday.

Late Tuesday, investment bank

Morgan Stanley

(MS) - Get Report

reported profits

that declined 7.7% year over year but beat expectations. Morgan Stanley had been facing pressure as other financial firms buckled.

Elsewhere, British bank

Barclays

(BCS) - Get Report

announced it would buy Lehman's North American businesses.

Also this morning, the

Securities and Exchange Commission

banned "abusive"

naked short-selling

on all publicly traded companies. The ban takes effect 12:01 a.m. EDT Thursday. Naked short-selling can be used to pressure stocks below their fair market value. Some market observers have pointed to naked shorts as a means to exploit the fearful credit environment for profit while depleting companies' capital levels.

Separately, Democratic and Republican lawmakers have floated the idea of developing a resolution trust similar to the one created during the savings-and-loan crisis of the 1980s. The government trust would help sort through the securities that contributed to the fall of

Bear Stearns

, Lehman,

Fannie Mae

(FNM)

and

Freddie Mac

(FRE)

.

In the technology sector, memory-chip maker

SanDisk

(SNDK)

rebuffed a $5.8 billion buyout bid by

Samsung Electronics

, saying Samsung has undervalued its business.

As for commodities, crude oil was adding $1.24 to $92.39 a barrel, and gold soared $52.40 to $832.90 an ounce.

In terms of economic data, the Census Bureau reported that building permits in the U.S. fell 6.2% to an annual rate of 895,000 -- a 17-year low -- in August. Economists were expecting a more modest decline to a rate of 925,000. Housing starts also dropped to 895,000, shy of analysts' forecasts for 950,000 new homes.

Longer-term U.S. Treasuries were rising. The 10-year was up 15/32 to yield 3.38%, and the 30-year was gaining 32/32, yielding 4.03%. The dollar was falling vs. the yen and pound but inching up against the euro.

Overseas, European exchanges lower, as the FTSE in London and the Dax in Frankfurt took losses. The Nikkei in Japan closed higher, while Hong Kong's Hang Seng finished on the downside.