NEW YORK - The dollar rose against most currencies on Wednesday especially those in emerging markets, as optimism over a US-Mexico trade deal gave way to concern that a conflict over trade between Washington and Beijing was not about to end soon.

The deadline for public comment on U.S. President Donald Trump’s tariffs on another $200 billion of Chinese goods is on Sept. 5, with the new measures possibly taking effect that month. “There is still a long way to go with Trump recently again threatening tariffs on cars from Europe and the U.S. preparing another $200 billion of tariffs against China,” said Craig Erlam, senior market analyst, at OANDA in London.

The U.S currency had dipped to a four-week low overnight as investors unwound safe-haven bets on the currency after the United States and Mexico agreed on Monday on overhauls to NAFTA.

The dollar has fallen for three consecutive weeks, even though the United States was raising interest rates faster than other major economies.

But on Wednesday the dollar rose 0.2 percent against the yen to 111. 48 yen JPY=. It was higher against the Australian and New Zealand dollars, up 0.6 percent AUD= and 0.2 percent NZD= respectively.

The dollar was also up against the Mexican peso MXN= and soared against the South African rand ZAR= and Turkish lira TRY=.

The greenback was also supported overall by data showing U.S. economic growth was a bit stronger than initially thought in the second quarter, notching its best performance in nearly four years.

Gross domestic product grew at a 4.2 percent annualized rate, the Commerce Department data showed in its second estimate of GDP growth for the second quarter. That was slightly up from the 4.1 percent pace of expansion reported in July and was the fastest rate since the third quarter of 2014.

The data has cemented expectations for an interest rate rise next month. Fed funds futures have priced in a 96 percent probability of a 25 basis-point rate increase at its next policy announcement on Sept. 26.

The euro EUR=, meanwhile, was flat at $1.1693 after gaining in the last three sessions, as worries mounted that Italy's public deficit could exceed the European Union's ceiling of 3 percent of gross domestic product.

The Canadian dollar CAD=D3 was slightly lower on the day versus the U.S. dollar, after rising in the last three days.

Canada has three days to tackle contentious issues when it resumes talks with the United States on Wednesday to salvage the trilateral North American Free Trade Agreement amid signs Ottawa was open to taking a more conciliatory approach.