NEW YORK (Reuters) - U.S. stocks closed lower on Tuesday, with initial gains giving way to declines as the likelihood of a prolonged trade war between the United States and China once again kept risk appetite in check.

U.S. President Donald Trump on Monday said he was “not yet ready” to make a deal with China, although he expected one could be reached in the future. An expanding tariff battle between the two sides has raised concerns the trade war would lead to a global economic slowdown.

“The market holds up well, but then the weak hands take over late in the day,” said Ryan Detrick, senior market strategist at LPL Financial in Charlotte, North Carolina.

“Pick a worry and it continues to grow and manifest, whether it be trade or looking into consumer confidence, thinking maybe those people did the survey before the China stuff hit the fan. Clearly it’s all about trade.”

Consumer confidence jumped in May as households grew more upbeat about the labor market, although economists said the strong readings likely did not fully capture the impact of the trade standoff between Washington and Beijing.

The uncertainty has pushed investors toward safe-haven assets, which resulted in benchmark 10-year U.S. Treasury yields dropping to their lowest since October 2017, while the spread between the 10-year and 3-month bills narrowed to nearly a 12-year low.

The majority of the 11 S&P sectors were in the red, with only communication services on the plus side.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., May 20, 2019. REUTERS/Brendan McDermid

The benchmark S&P 500 index is now down nearly 5% from its closing high set on April 30, while the Dow Jones Industrial index declined for a fifth straight week on Friday, its longest weekly losing streak in eight years.

The tech sector, which is down 7.3% this month, also gave up early gains and turned negative despite a boost from a 4.72% jump in Total System Services Inc.

Global Payments Inc said it would buy the payment technology company for about $21.5 billion in stock. Its shares declined 3.04%.

In addition, Advanced Micro Devices shares surged 9.80% after the company unveiled new chips to battle for market share with Intel, which fell 2.24%.

The Dow Jones Industrial Average fell 237.32 points, or 0.93%, to 25,348.37, the S&P 500 lost 23.91 points, or 0.85%, to 2,802.15 and the Nasdaq Composite dropped 29.66 points, or 0.39%, to 7,607.35.

Among other stocks, Activision Blizzard Inc rose 2.86% after Goldman Sachs upgraded its shares to “buy” and said the videogame publisher would benefit from its recent releases.

FedEx Corp slipped 0.93% after Huawei Technologies Co Ltd said it is reviewing its relationship with the U.S. package delivery company after FedEx diverted two parcels destined for Huawei addresses in Asia to the United States.

Declining issues outnumbered advancing ones on the NYSE by a 1.94-to-1 ratio; on Nasdaq, a 1.71-to-1 ratio favored decliners.

The S&P 500 posted 17 new 52-week highs and 19 new lows; the Nasdaq Composite recorded 55 new highs and 134 new lows.

Volume is expected to be light throughout the holiday shortened trading week. About 6.67 billion shares changed hands in U.S. exchanges on Tuesday, compared with the 6.99 billion-share daily average over the last 20 sessions.