NEW YORK — U.S. stocks recovered further on Monday from last week’s selloff, with the S&P 500 posting its biggest one-day percentage gain since April as worries eased about a conflict between the United States and North Korea.

Technology shares were among stocks giving the index its biggest boost. Apple was up 1.5 percent, while the S&P 500 technology index rose 1.6 percent.

U.S. officials on Sunday played down the risk of an imminent war with North Korea. Those concerns had helped wipe out nearly $1 trillion from global equity markets last week.

“The selling never did cascade. We had an adjustment and this week investors were able to sit back and say the Korean situation is something to watch, but it’s probably had its effect on the market already,” said Bucky Hellwig, senior vice president at BB&T Wealth Management in Birmingham, Alabama.

“There’s still cash on the sidelines looking for an opportunity to buy the dip. They’re in there with both hands today.”

The CBOE Volatility index, Wall Street’s fear gauge, fell more than 3 points after it spiked to a nine-month high last week. Safe-haven gold, which hit two-month highs last week, also dropped.

The Dow Jones Industrial Average rose 135.39 points, or 0.62 percent, to close at 21,993.71, while the S&P 500 gained 24.52 points, or 1.00 percent, to 2,465.84, just the third day this year where the S&P 500 posted at least a 1 percent gain.

The Nasdaq Composite added 83.68 points, or 1.34 percent, to 6,340.23.

Snap Inc’s stock ended up 6.5 percent after hitting a record low hit as big investors reported their latest stakes in the beleaguered social media company and as a wave of employees became eligible to sell their shares.

Tesla rose 1.7 percent after two brokerages raised their price targets on the stock, citing the potential success of the company’s Model 3 sedan.

Alibaba gained 1.9 percent after Dan Loeb’s Third Point bought 4.5 million shares in the Chinese e-commerce company.

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

The S&P 500 posted 49 new 52-week highs and 10 new lows; the Nasdaq Composite recorded 98 new highs and 85 new lows.

About 5.5 billion shares changed hands on U.S. exchanges. That compares with the 6.3 billion daily average for the past 20 trading days, according to Thomson Reuters data.