U.S. stocks rose Wednesday as takeover activity resurfaced and credit markets stabilized, luring investors back into riskier assets such as equities.

The Dow Jones industrial average climbed 145.27 points, or 1.11 percent, to end at 13,236.13. The Standard & Poor's 500 Index was up 16.95 points, or 1.17 percent, at 1,464.07. The Nasdaq Composite Index was up 31.50 points, or 1.25 percent, at 2,552.80.

Hopes for a Federal Reserve interest-rate cut persisted as they have since last Friday, highlighting renewed confidence that policy makers would not let financial markets go into a tailspin.

TD Ameritrade Holding Corp (AMTD) shares jumped 4.9 percent to $17.15 on news it was discussing a combination with other online brokers. The Wall Street Journal reported that E+Trade Financial was in talks with TD Ameritrade.

Shares of industrial and material companies surged, with aluminum company Alcoa Inc. (AA) rising 4.7 percent to $36.22 after BHP Billiton Ltd, the world's largest miner, posted a 19 percent jump in second-half earnings.

Stocks also rose as the flood of cash into the safety of short-term Treasury debt slowed. At the same time, issuers returned to the corporate bond market and prices rose in the mortgage-backed securities market.

"The market senses that the Fed will make sure there's liquidity," said Mark Bronzo, managing director at Gartmore Separate Accounts LLC in Irvington, New York. "People are sensing the fears are fairly high in terms of the credit markets and, as a result, maybe the worst of that is priced in, and you're seeing some signs of stability there."

The Nasdaq rose for a fourth session in a row and is now up 5.7 percent for the year, led this week by gains in shares of Apple Inc.

Apple (APPL) advanced 3.9 percent to $132.51 after reports that the company had reached revenue-sharing deals with several European mobile network operators as it prepares to launch the iPhone in Europe later this year.

Around midday, several big U.S. banks, including Citigroup Inc, said they had borrowed money directly from the Federal Reserve.

Analysts said the move could be encouraging for the market after the Fed said that using its discount window would be considered a sign of strength. Banks have traditionally been hesitant to use the discount window since it is a direct loan from the Fed, one of the primary federal bank regulators.

The S&P index of financial shares ended with a gain of 0.8 percent after falling earlier on the news.

Citigroup's stock also advanced 0.8 percent to close at $48.43 on the New York Stock Exchange.

In other deal news, Dubai agreed to pay up to $5.1 billion for a 9.5 percent stake in MGM Mirage Inc and half the casino company's CitiCenter hotels and apartments project in Las Vegas. MGM shares gained 8.9 percent to $80.94.

E+Trade shares fell 2.1 percent to $15.25 on the Nasdaq.

NYMEX Holdings Inc's shares rose 6.1 percent to $126.06 on the Big Board after the parent of the New York Mercantile Exchange said late Tuesday it has held preliminary discussions about a potential merger.

Besides Alcoa, the Dow's top positive influences included big manufacturers like Caterpillar Inc., up 1.4 percent at $75.30, and DuPont , up 2.5 percent at $48.92.

Speculation that the U.S. central bank will cut benchmark rates sooner rather than later increased after it surprised markets on Friday by cutting the discount rate, which it charges banks to borrow from it.

Problems in the risky U.S. subprime mortgage sector have spurred sharp declines in world stocks over the past month.

Trading was below average on the New York Stock Exchange, with about 1.45 billion shares changing hands, down from last year's estimated daily average of 1.84 billion, while on Nasdaq, about 1.84 billion shares traded, also down from last year's daily average of 2.02 billion.

Advancing stocks outnumbered declining ones by a ratio of about 4 to 1 on the NYSE and by 2 to 1 on Nasdaq.