NEW YORK (Reuters) - The energy sector led the beaten-up U.S. stock market higher on Thursday as oil prices rebounded from 12-year lows.

People walk through the lobby of the London Stock Exchange in London, Britain August 25, 2015. REUTERS/Suzanne Plunkett

Major U.S. indexes climbed about 2 percent after dropping to 3-1/2 month lows on Wednesday. Gains in stocks and oil also helped push the U.S. dollar higher, while the increases in risk assets reduced demand for safe-haven gold and U.S. government debt.

Equity markets have tumbled to start the year as volatility in Chinese shares and the persistent slide in oil made investors jittery about the health of the global economy.

“Oil has been able to hold the gains, and I think that has just given a little confidence for people to come back into the market today,” said Maury Fertig, chief investment officer at Relative Value Partners in Northbrook, Illinois.

The Dow Jones industrial average .DJI rose 227.64 points, or 1.41 percent, to 16,379.05, the S&P 500 .SPX gained 31.56 points, or 1.67 percent, to 1,921.84 and the Nasdaq Composite .IXIC added 88.94 points, or 1.97 percent, to 4,615.00.

The U.S. energy group .SPNY surged 4.5 percent, leading all sectors.

Investors were also encouraged by comments from St. Louis Federal Reserve President James Bullard, who said the oil rout has caused a “worrisome” drop in U.S. inflation expectations that may make further rate hikes hard to justify.

The Fed will raise interest rates three times this year, a Reuters poll of economists found.

Better-than-expected results from JP Morgan JPM.N gave a boost to what is expected to be a dour U.S. corporate earnings season.

“You have perhaps the biggest financial bank stock that came out, and they had pretty good results, so that may have quieted down some concerns,” said Chuck Carlson, chief executive officer at Horizon Investment Services in Hammond, Indiana.

January’s deep losses may have primed the stock market for a rebound but rallies have tended to fizzle at the start of 2016. On Thursday, too, stocks ended well off their highs.

The pan-European FTSEurofirst 300 index .FTEU3 dropped 1.5 percent, hurt by a slump in the auto sector as Renault RENA.PA faced an emissions probe, but the index came off its 13-month lows.

MSCI's broadest gauge of stocks globally .MIWD00000PUS rose 0.3 percent.

Benchmark Brent oil snapped an eight-day rout as some players covered short positions after crude prices plumbed new 12-year lows on worries that Iran may add its barrels to a glutted global market sooner than expected.

With options for U.S. crude’s front-month February futures expiring, traders were covering short positions.

“Natural covering interest is buoying the market as many had $30 as an objective,” said Pete Donovan, broker at Liquidity Energy in New York.

U.S. crude prices CLc1 settled up 2.4 percent at $31.20 a barrel, while Brent crude LCOc1 settled up 2.4 percent at $31.03 a barrel.

The dollar rose, bolstered by gains in the U.S. stock market and a rebound in oil prices, suggesting that the Federal Reserve will not be as constrained to push ahead with its plan to raise interest rates several times this year.

The U.S. dollar .DXY rose 0.1 percent against a basket of currencies, while the euro EUR= fell 0.1 percent against the dollar.

Prices on U.S. Treasuries fell as oil prices steadied. Benchmark 10-year U.S. Treasury notes US10YT=RR fell 8/32 in price to yield 2.0926 percent, from 2.066 late on Wednesday.

Spot gold XAU= fell 1.4 percent as the oil price rebound and rise in U.S. shares blunted bullion's appeal as a haven.