U.S. stocks rebounded Tuesday after falling oil prices released some of the pressure that built up on the market.

The S&P 500 rallied 1% to claw back all of its loss from the day before. The Dow Jones industrial average rose 126 points, or 0.3%, and likewise neared its record set last week, while the Nasdaq composite led the way with a 1.4% rally.

Wall Street held firm even though stock markets around the world sank following scary swings in China, as euphoria about possible stimulus for the world’s second-largest economy gave way to disappointment. Stocks tumbled 9.4% in Hong Kong for their worst day since the 2008 global financial crisis.

Helping to support Wall Street was a sharp drawdown in oil prices. They gave back some of the big recent gains they made on worries that worsening tensions in the Middle East could ultimately lead to disruptions in the flow of oil.

A barrel of Brent crude, the international standard, fell 4.6% to $77.18 for its first loss in a week and a half. A barrel of benchmark U.S. crude, meanwhile, eased 4.6% to $73.57.

The 10-year Treasury yield edged down to 4.02 from 4.03% late Monday. The two-year yield, which more closely tracks expectations for what the Federal Reserve will do with overnight interest rates, slipped to 3.96% from 3.99%, late Monday, though it’s still near its highest level since August.

On Tuesday, all of the Big Tech stocks rose. Nvidia led the way with a gain of 4% and was the strongest single force pushing upward on the S&P 500.

PepsiCo climbed 1.9% after delivering stronger profit for the latest quarter than analysts expected, though its revenue fell short.

On the losing end of Wall Street were oil-and-gas companies, which gave back some of their big recent gains driven by the last week’s jump in crude prices. Chevron fell 1.6% and was one of the main reasons the Dow lagged other indexes.

All told, the S&P 500 rose 55.19 points to 5,751.13. The Dow added 126.13 to 42,080.37, and the Nasdaq gained 259.01 to 18,182.92.

In stock markets abroad, trading in mainland China reopened following a national holiday.On Tuesday, China’s economic planning agency outlined details of measures aimed at boosting the economy, but it refrained from major spending initiatives.

In Shanghai, where the market had been closed as Hong Kong ran higher over the last week, stocks rose 4.6% following their reopening.

— Associated Press