(Reuters) - U.S. stocks rallied on Thursday as hopes for a truce in the price war between Saudi Arabia and Russia and a cut in oil output drove gains, taking some sting out of a shocking jump in Americans filing jobless claims due to coronavirus-led lockdowns.

The S&P energy index .SPNY, down by more than 50% this year due to the Russia-Saudi price war and coronavirus-driven demand worries that has caused oil prices to plunge, climbed 9.08%.

Saudi Arabia has called for an emergency meeting of oil producers, while U.S. President Donald Trump said he expected the kingdom and Russia to cut output by as much as 10 million to 15 million barrels a day. That helped U.S. crude CLc1 futures settle up 24.7%, and Brent up 21.5%, their biggest daily percentage gains on record.

Still, major averages waded into negative territory multiple times before a late rally pushed stocks higher to close near session highs.

“It got beaten up so badly, you don’t rally like this unless it was many people thinking this got overdone,” said JJ Kinahan, chief market strategist at TD Ameritrade in Chicago.

The Dow Jones Industrial Average .DJI rose 469.93 points, or 2.24%, to 21,413.44, the S&P 500 .SPX gained 56.4 points, or 2.28%, to 2,526.9 and the Nasdaq Composite .IXIC added 126.73 points, or 1.72%, to 7,487.31.

The list of top gainers on the benchmark S&P 500 was littered with oil companies. Occidental Petroleum OXY.N surged 18.90%, with names such as Apache Corp APA.N and Halliburton HAL.N also seeing double-digit percentage gains.

A bump in prices may still not be enough to save some of the debt-laden U.S. shale companies that are on the brink of bankruptcy as demand continues to plunge due to the coronavirus pandemic.

Analysts foresee a further decline in U.S. stocks as country-wide shutdowns to limit the spread of the virus result in a virtual halt in business activity and force companies to lay off employees and save cash.

Boeing Co BA.N, once a symbol of America's industrial might, has offered buyout and early retirement packages to employees, sending its shares down 5.68%.

Investors continue to absorb a wave of bad economic news that will continue to paint a grim picture. Initial claims for unemployment benefits last week rose to 6.65 million, exceeding the top end of economists’ estimates at 5.25 million.

“Overall this is a little bit of a victory in and of the fact that it was such a bad number and the market did kind of shake it off. It is also the market preparing for a lot more bad numbers,” said Kinahan.

As earnings season slowly begins to get underway, Walgreens WBA.O fell 6.30% after the drugstore retailer reported a steep decline in U.S same-store sales in the last week of March. [L4N2BQ32Z]

Advancing issues outnumbered declining ones on the NYSE by a 1.61-to-1 ratio; on Nasdaq, a 1.34-to-1 ratio favored advancers.

The S&P 500 posted no new 52-week highs and 20 new lows; the Nasdaq Composite recorded 6 new highs and 132 new lows.

Volume on U.S. exchanges was 12.64 billion shares, compared with the 15.87 billion average for the full session over the last 20 trading days.