TORONTO -- North American markets fell modestly Tuesday as trade uncertainty revved up between the U.S. and China ahead of an expected interest rate cut by the Federal Reserve.

Markets dipped after U.S. President Donald Trump warned the Chinese not to wait out his first term in office to finalize a new trade deal.

"The problem with them waiting, however, is that if & when I win, the deal that they get will be much tougher than what we are negotiating now...or no deal at all," he tweeted, also complaining that China wasn't purchasing agricultural products as promised.

Trump's comments came as U.S. negotiators resumed talks in Shanghai.

Market sentiment was revolving around speculation on whether the talks would be successful, said Candice Bangsund, portfolio manager for Fiera Capital.

The S&P/TSX composite index closed down 26.12 points at 16,466.05 despite gains by the energy and materials sectors.

In New York, the Dow Jones industrial average was down 23.33 points at 27,198.02. The S&P 500 index was down 7.79 points at 3,013.18, while the Nasdaq composite was down 19.71 points at 8,273.61.

Nine of the 11 major sectors of the TSX were lower, led by consumer discretionary and telecommunication sectors, along with the heavyweight financials sector.

Energy gained 2.29 per cent as Encana Corp. rose 6.1 per cent, following by Baytex Energy Corp. and Crescent Point Energy Corp., on higher crude prices.

The September crude contract was up US$1.18 at US$58.05 per barrel and the September natural gas contract was up 3.1 cents at US$2.14 per mmBTU.

Crude rose on expectations that Wednesday's U.S. stockpile report will show sharp declines in inventories.

Materials was also higher as shares of Canadian fertilizer giant Nutrien Ltd. jumped 7.1 per cent after it posted strong second-quarter results despite what it called the "worst U.S. planting season in history."

In addition, gold prices rose on anticipation that the U.S. central bank would cut interest rates for the first time since 2008.

The December gold contract was up $8.50 at US$1,441.80 an ounce and the September copper contract was down 3.9 cents at US$2.68 a pound.

Markets are anticipating that the Federal Reserve will cut rates by 0.25 per cent on Wednesday, followed by three more cuts through the end of 2020.

Bangsund is more hawkish, anticipating that the central bank will disappoint markets by cutting just once. Consumer confidence numbers released Wednesday were stronger than expected, further tempering Fed chairman Jerome Powell's need to aggressively cut rates because of a weakening economy, she said.

"Our expectation is that he signals an openness to lowering rates further but maintains some flexibility, essentially allowing for the Fed to monitor the economy and the geopolitical as well as the trade backdrop before making their next move," she said in an interview.

"It could be a case of the Fed not being able to meet the market's very hopeful expectation for multiple rate cuts."

Bangsund said there's a lot of nervousness among investors about the direction of monetary policy and trade talks.

"If it wasn't for the fact that global trade was weighing on the global economy, the Fed would not be cutting rates tomorrow."