Wall Street's main indexes closed higher after a choppy session on Thursday as investors grew more optimistic on trade after reports that the United States is considering a delay in imposing tariffs on Mexican imports.
The market added to gains after a Bloomberg report cited unidentified sources saying that US President Donald Trump could delay the tariffs he had threatened to put on Mexican goods as soon as Monday.
The Washington Post reported that under a possible immigration deal, Mexico would deploy 6,000 troops to the Guatemalan border.
But strategists urged caution until a final US-Mexico deal is reached and followed by a US-China trade deal.
"You have to take all of this with a huge grain of salt," said Sameer Samana, senior global market strategist at Wells Fargo Investment Institute in St. Louis, adding that even if the Mexico report is true, "it would be a short-term positive."
"It's not giving that long-term clarity businesses and investors and consumers need to make decisions," he said.
Earlier in the day Trump said he would decide on more tariffs "probably right after the G20" meeting later this month, which followed his warning overnight that he would levy duties on at least another $300 billion worth of Chinese goods.
The Dow Jones Industrial Average rose 181.09 points, or 0.71 percent, to 25,720.66, the S&P 500 gained 17.34 points, or 0.61 percent, to 2,843.49 and the Nasdaq Composite added 40.08 points, or 0.53 percent, to 7,615.55.
It was the first time since mid-May that the three major indexes gained ground for three sessions in a row.
The energy sector, which was the hardest-hit last month by heightening trade tensions, rose 1.7 percent as crude prices made some gains late in the day, making it the biggest percentage gainer of the S&P's 11 major sectors.
The trade-sensitive industrial sector regained some ground late in the session and ended the day up 0.01 percent after falling as much as 0.86 percent earlier.
While investors are hopeful that the US Federal Reserve could be open to cutting interest rates if needed, they were cautious before the US jobs report due on Friday morning after private data was weaker than expected on Wednesday.
"There's a recognition that easier monetary policy is likely to prolong this economic cycle and is likely to support higher-than-normal valuation," said Michael Arone, chief investment strategist at State Street Global Advisors.
"But for the market to move materially higher, there's a feeling that trade agreements need to be reached in order to push economic growth higher."
Federal Reserve policymakers have hinted they would be ready to cut rates if the US-China trade spat threatens a decade-long expansion. Since early May, Trump has slapped tariffs on Chinese imports and warned of US levies on Mexico.
"People are positioning for weaker jobs data. If there's not a trade deal by the end of June and payrolls weaken, you could see the Fed consider a cut by the July meeting," said Wells Fargo's Samana.
Earlier in the day, the European Central Bank also underscored the threat to global economic expansion from the trade disputes by trimming the region's growth forecasts for the next two years.
Advancing issues outnumbered declining ones on the NYSE by a 1.50-to-1 ratio; on Nasdaq, a 1.27-to-1 ratio favoured decliners.
The S&P 500 posted 84 new 52-week highs and 5 new lows; the Nasdaq Composite recorded 64 new highs and 154 new lows.On U.S exchanges 6.72 billion shares changed hands, compared with the 7.12 billion average for the last 20 sessions.