NEW YORK (Reuters) - Wall Street’s major indexes rose on Wednesday as investors bet on a Federal Reserve interest rate cut after weak private sector jobs data and hopes grew that the United States and Mexico would reach an agreement to avoid U.S. tariffs on Mexican goods.

The gains extended the rally on Tuesday when Fed Chairman Jerome Powell indicated the central bank may have to react to the U.S. trade wars, boosting rate cut hopes. Other Fed officials also hinted that a rate cut was possible.

The ADP National Employment Report on Wednesday further bolstered bets for a rate cut. U.S. private employers hired at the slowest pace in more than nine years in May, weakness that analysts blamed on the heightening global trade tensions.

The data comes ahead of more comprehensive nonfarm payrolls data from the Labor Department due out on Friday.

“Today and yesterday the market was embracing the idea of more weakness in the economy giving the Fed some cover to preemptively cut rates. If the excuse evaporates with a strong jobs number Friday the market might be disappointed,” said Jeffrey Kleintop, Chief Global Investment Strategist at Charles Schwab in Boston.

For now, he said, the market is betting the Fed will make a precautionary rate cut in July.

The Dow Jones Industrial Average rose 207.39 points, or 0.82%, to 25,539.57, the S&P 500 gained 22.88 points, or 0.82%, to 2,826.15 and the Nasdaq Composite added 48.36 points, or 0.64%, to 7,575.48.

Investors were also encouraged after U.S. President Donald Trump said he thinks Mexico wants to reach a deal to stop a new trade war. A White House trade adviser and a senior U.S. Republican senator also said Washington might not introduce proposed tariffs.

A Mexico deal “would alleviate one of the risks that lurk out there,” said Mark Luschini, chief investment strategist at Janney Montgomery Scott in Philadelphia who also cited the prospects of rate hike cuts.

Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., June 5, 2019. REUTERS/Brendan McDermid

Schwab’s Kleintop saw the prospect of rate cuts as a bigger factor because defensive dividend sectors that do well in low rate environments were outperforming more trade-sensitive sectors in Wednesday’s rally.

The top gainers among the S&P 500’s 11 major sectors were real estate which ended up 2.3%, while utilities closed up 2.1% and consumer staples registered a 1.1% advance.

But a rally with defensive sectors outperforming more cyclical sectors made Janney Montgomery Scott’s Luschini wary.

“You’d want to see materials, energy, industrials, financials leading the rally,” he said. “I’d be reluctant to chase this rally because it might just be a snapback rebound.”

The technology sector rose 1.4% and provided the biggest boost to the market, helped by Apple Inc and Microsoft Corp. Another big boost was Salesforce.com Inc, which advanced 5.1% after the cloud-based service provider forecast full-year results above expectations.

The energy sector slipped 1.1%, making it the only S&P sector in the red, as crude prices fell sharply.

Campbell Soup Co, the biggest percentage gainer on the S&P 500, rose 10% after the canned soup maker raised its full-year profit forecast.

Advancing issues outnumbered declining ones on the NYSE by a 1.09-to-1 ratio; on Nasdaq, a 1.34-to-1 ratio favored decliners.

The S&P 500 posted 66 new 52-week highs and 7 new lows; the Nasdaq Composite recorded 68 new highs and 117 new lows.

On U.S. exchanges 7.02 billion shares changed hands compared with the 7.12 billion average for the last 20 sessions.