Stocks gained modestly Wednesday, finding some momentum at the end of a session that was negatively influenced by a weak Federal Reserve (Fed) report on the U.S. economy and Ambac Financial's restructuring plan. The three major indexes had posted gains through the early afternoon, as investors welcomed a better-than-expected reading on the U.S. services sector that helped overshadow weak readings on U.S. factory orders and private-sector employment. The Institute for Supply Management's index on the service sector rose to 49.3 in February from a previous reading of 44.6. While the performance was better than expected, any reading below 50 reflects a contraction in the sector. In another report, U.S. factory orders fell 2.5 percent in January, as expected, after rising 2 percent the previous month. Private-sector employment fell 23,000 jobs in February, contrasting with forecasts for a rise of 15,000, a private firm said. Early reports that banks negotiating a deal to keep bond insurer Ambac in business could finish the agreement today had been helping stocks. But Wall Street lost gains after Ambac did not announce a bailout plan and instead said it would raise about $1.5 billion through a stock offering and restructuring of its business. Trading in Ambac shares had been halted ahead of the news, and its stock fell 15 percent in the afternoon. Adding to negative investor sentiment in the early afternoon was the release of the Fed's “beige book” reading on the economy, which showed that most of the 12 districts reported a slowdown in economic activity since the start of the year. Light sweet crude for April delivery jumped $5 to $104.52 a barrel on the New York Mercantile Exchange, a record high. During the session, oil hit a trading high of $104.64. Influencing prices were news that OPEC decided to hold production levels steady and a weekly U.S. inventory report showing a drop in crude supplies. The Dow Jones industrial average rose 41.19, or 0.3 percent, to 12,254.99. Shares of Exxon Mobil rose with the gain in oil prices. The broader Standard & Poor's 500 index rose 6.95, or 0.5 percent, to 1,333.70. The technology-heavy Nasdaq composite index rose 12.53, or 0.55 percent, to 2,272.81. The American Stock Exchange composite index rose 70.97 to 8,962.42. The American Stock Exchange composite index rose 3.69 to 2,317.43. And the Russell 2000 index rose 2.76 to 683.74.