"The market has been holding up pretty well in the face of negative employment data this morning, which is taking away a potential negative surprise on the jobs report tomorrow," said Ken Tower, chief market strategist at Covered Bridge Tactical.
The market slumped Wednesday, after Federal Reserve Chairman Ben Bernanke told Congress the U.S. economy might be in recession for the first half of the year. Investors remained nervous Thursday as Bernanke and regulators answered questions on why the Fed intervened to prevent investment firm Bear Stearns from collapsing. .
"It appears that senators recognize this was an extraordinary situation and that's reassuring to the market," Tower said.
The Dow Jones Industrial Average gained 20.2 points to 12,626.03, with 18 of its 30 components settling ahead.
Blue-chip gains were fueled by Alcoa , Merck and financials such as Citigroup , J.P. Morgan Chase and Bank of America .
The S&P 500 climbed 1.78 points to 1,369.31, while the technology-laden Nasdaq Composite advanced 1.9 points to 2,363.30.
Leading the gains among S&P 500 sectors were telecommunication services, up 1.2%, followed by information technology, which advanced 1%, and materials, rising 0.7%.
The utility sector led sector laggards, off 0.4%.
Volume on the New York Stock Exchange topped 3.8 billion, and advancing stocks ran ahead of those declining, roughly 3 to 2. On the Nasdaq, 1.9 billion shares exchanged hands, and decliners edged just ahead of advancers.
The market had opened under pressure after the Labor Department reported first-time applications for state unemployment benefits climbed last week, hitting levels last seen in mid-September 2005. .
But stock indexes pared losses after the Institute for Supply Management's March reading of the services sector proved better than forecast, with its non-manufacturing index rising to 49.6% in March, above the 48.5% reading analysts had expected.
"Today's report is consistent with our view that the economy has decidedly slowed and has likely fallen into only a mild recession," said Lehman Brothers analyst Michelle Meyer.
The airline sector came under fire after privately held ATA Airlines closed operations and filed for bankruptcy, with the Amex Airline Index edging slightly higher by the close. .
A downgrade of technology bellwether Cisco Systems Inc. earlier weighed on investor sentiment, with UBS expressing concern over the networking giant's orders growth in switching its recommendation to neutral from buy.
Shares of Cisco fell 2.9%.
Shares of eBay Inc. fell 0.1% after the online auctioneer drew an upgrade to buy from neutral from Merrill Lynch.
On the New York Mercantile Exchange, gold futures gained, with the metal contract rising $9.40 at end at $909.60 an ounce.
Also on the NYME, crude-oil futures fell $1 to settle at $103.83 a barrel.
The dollar index, which measures the U.S. currency against a handful of rivals, was virtually flat at 72.20 vs. 72.24 late Wednesday. .
By Kate Gibson