Stocks finished solidly higher on Wall Street as investors welcomed news of a 90-day truce in the trade battle between the U.S. and China.

The broad rally Monday, which lost some of its early morning momentum, followed gains in overseas markets.

The stand-down was agreed to over the weekend at a meeting between President Donald Trump and his Chinese counterpart Xi Jinping at the G-20 summit.

Technology companies did particularly well. Chipmaker Advanced Micro Devices jumped 11.3 percent.

The price of oil rallied 4 percent, sending energy companies higher.

The S&P 500 index rose 30 points, or 1.1 percent, to 2,790. The Nasdaq increased 110 points, or 1.5 percent, to 7,441.

The Dow Jones Industrial Average rose 287 points, or 1.1 percent, to 25,826. It was up 441 earlier.

Markets in Europe also climbed. Germany’s DAX gained 1.8 percent, while France’s CAC 40 rose 1 percent. Britain’s FTSE 100 added 1.2 percent.

After a steep decline in October, stocks steadied in early November. But the selling picked up again as investors abandoned high-flying technology stocks amid concerns over the U.S.-China trade tussle and slowing global economic growth and bailed on energy stocks as the price of oil plummeted.

Presidents Trump and Xi of China met at the G-20 summit over the weekend and agreed to a cease-fire, lasting for at least 90 days, to allow time to smooth out a dispute over Chinese technology policies that the U.S. and other trading partners consider predatory.

Trump agreed to hold off on plans to raise tariffs on $200 billion in Chinese goods, which were supposed to kick in on Jan. 1. In return, Xi agreed to buy a “very substantial amount” of agricultural, energy and industrial products from the U.S. to reduce its large trade deficit with China, the White House said.

The U.S. had announced tariffs on $250 billion in Chinese imports this year, with the tax rate on many products set to rise Jan. 1, while China put new taxes on $110 billion in U.S. goods.

While the truce has the potential to steady markets through the end of the year, the countries still need to hammer out a lasting trade deal.

“Three months is not a very long time to achieve this so there are naturally plenty of sceptics out there but this is a rare piece of good news in a conflict that has yet to produce any,” said Craig Erlam, senior market analyst at OANDA.

The trade truce was one of several factors helping push oil prices higher Monday. Crude prices also jumped on news that Qatar will withdraw from OPEC in January. The move, which marks the first time a Mideast nation has exited the cartel since its founding in 1960, came ahead of an OPEC meeting on Thursday.

In addition, the government of the Canadian province of Alberta announced a large cut in oil production Monday.

“We expect OPEC to follow suit and agree to a production cut in Vienna this coming Thursday,” analysts with Goldman Sachs wrote in a published note Monday.

Benchmark U.S. crude gained 4 percent to settle at $52.95 per barrel in New York. Brent crude, the international standard, rose 3.8 percent to close at $61.69 per barrel in London.

Oil prices had been falling in recent weeks as supplies built up, partly because the U.S. agreed to hold off on sanctions for countries that import oil from Iran. Traders have also been worried that a slowdown in global economic growth will reduce demand for fuels.

Monday’s pickup in oil prices gave energy stocks a boost. Devon Energy climbed 6.3 percent to $28.72.

Gains in technology companies helped drive the market higher. Chipmaker Advanced Micro Devices jumped 10.8 percent to $23.61.

Auto manufacturers also rose after Trump said on Twitter late Sunday that Beijing agreed to cut import duties on U.S. autos. There was no Chinese confirmation of the move, which would have little impact on trade because most American vehicles sold in China are made there.

Ford Motor rose 2.4 percent to $9.64, while General Motors added 1.9 percent to $38.68. Tesla gained 2.2 percent to $358.32.

A couple of corporate deals also helped move the market Monday.

Tribune Media jumped 11.2 percent to $44.77 after the TV station owner agreed to be acquired by Nexstar Media Group, four months after a bid from Sinclair Broadcast Group collapsed. Nextar shares added 5 percent to $86.81.

GlaxoSmithKline PLC slumped 8.1 percent to $38.47 after the drugmaker agreed to acquire Tesaro, which makes the ovarian cancer treatment Zejula. Shares in Tesaro soared 58.7 percent to $73.58.

Meanwhile, Wynn Resorts gained 9.4 percent to $119.69 after the gambling revenue in Macau rose last month at a higher rate than analysts expected.

Bond prices rose. The yield on the 10-year Treasury note fell to 2.99 percent from 3.01 percent late Friday.

The dollar rose to 113.69 yen from 113.63 yen late Friday. The euro strengthened to $1.1342 from $1.1309.

Gold gained 1.1 percent to $1,239.60 an ounce. Silver jumped 2 percent to $14.50 an ounce. Copper added 0.8 percent to $2.81 a pound.

Wholesale gasoline gained 2.1 percent to $1.43 a gallon. Heating oil climbed 3.2 percent to $1.89 a gallon. Natural gas lost 5.9 percent to $4.34 per 1,000 cubic feet.

Major indexes in Asia finished higher. Hong Kong’s Hang Seng surged 2.6 percent, while Japan’s Nikkei 225 index climbed 1 percent. The Kospi in South Korea jumped 1.7 percent. The S&P ASX/200 in Australia added 1.8 percent. Shares rallied in Taiwan and throughout Southeast Asia.

© The Associated Press. All rights reserved.