(Bloomberg) -- Mexico said differences are narrowing in talks to revamp Nafta even as President Donald Trump seemed to sap some goodwill by calling the trade pact a “a bad joke” and repeating his demand that the U.S.’s southern neighbor pay for a border wall.

Uncertainty about the path for the negotiation has whipsawed investors, with Trump alternating between saying he prefers to renegotiate and repeating his threats to leave or to use withdrawal as a negotiating tactic. Canadian officials said last week they believe the odds are rising that Trump will give notice of a withdrawal.

While negotiators, who began their work in August, have made progress on more mundane issues like rules of small businesses, they have yet to reach agreement on the topics that the White House sees as key to returning jobs to the U.S., like content for cars and government purchasing rules. Mexico’s ambassador to the U.S., Geronimo Gutierrez, said that the nation may be able to accept an increase in the minimum regional content for vehicles. At the same time, he reiterated the government’s long-standing position that it will leave the negotiating table if Trump gives notice of his intention to withdraw.

"We have consensus on around 40 percent of the issues already," Gutierrez said in an interview Thursday with Bloomberg Television in Washington. Raising the requirement for cars built in North America from the current 62.5 percent regional content is "certainly a possibility, but on rules of origin we need to be very careful to make sure they’re looked at almost on a product-by-product basis."

Read more: Kill Nafta? It’s Not as Easy as Trump Might Think: QuickTake Q&A

The U.S. demand for more North American, and specifically U.S. content in vehicles is among the most contentious issues on the North American Free Trade Agreement negotiating table. Negotiators largely avoided these issues in the latest talks in Mexico City in November and Washington in December, setting up the meetings in Montreal next week as potentially decisive.

The talks in Canada officially were scheduled to run from Jan. 23 to Jan. 28 and were extended on Thursday through Jan. 29, when the trade ministers from the three countries will meet.

Mexico and Canada began negotiating with the U.S. at the initiative of Trump, who has repeatedly said the Nafta accord led U.S. companies to fire workers and move factories to Mexico and has promised to pursue a better deal for America.

Read more: Mexican Peso Traders Are Learning to Ignore Trump’s Tweets

Nafta requires a vehicle to have a minimum of North American content in order to benefit from tariff exemptions when made in Mexico and sold in the U.S. The U.S. has proposed raising the so-called auto rules of origin to 85 percent North American content and requiring a new 50 percent U.S. content minimum.

Mexico Economy Minister Ildefonso Guajardo said last week that negotiators are close to completing work on 10 of the 30 Nafta chapters, including energy and telecommunications. The process for agreeing to dispute resolution mechanisms will be more difficult, he said.

The 47-year-old Gutierrez, who became ambassador to the U.S. last year following Trump’s election, spent the previous half decade as managing director of the North American Development Bank based in San Antonio, Texas. He has also been a deputy foreign minister for Latin America and North America. He studied economics together with Foreign Minister Luis Videgaray at Mexico’s Autonomous Institute of Technology in the early 1990s.

(Adds comments from Trump starting in first paragraph.)

--With assistance from Ali Donaldson and Josh Wingrove

To contact the reporters on this story: Eric Martin in Mexico City at [email protected], Shery Ahn in Washington at [email protected].

To contact the editors responsible for this story: Vivianne Rodrigues at [email protected], Robert Jameson

©2018 Bloomberg L.P.