Even as Trump, Canadian Prime Minister Justin Trudeau and Mexican President Enrique Peña Nieto - on his final day in office - prepared to sign the deal on the sidelines of the G-20 meeting, officials from the three countries were continuing to haggle over terms for lifting the USA tariffs, and details of the signing ceremony were in flux.
The signing of the trade pact came to fruitation after more than a year of contentious negotiations that came right down to the wire.
At the event, on the sidelines of an global summit opening in Buenos Aires, Trump touted the hard-fought deal as "a truly groundbreaking achievement" and proudly held up the signed agreement for the cameras at the conclusion of a short ceremony.
Trump since his campaign had called NAFTA the worst trade deal in history, though much of it is carried over in the new version. He threatened to tear it up and withdraw the US completely at times during the negotiation, which would have left trade between the three neighbors in disarray.
Mexico's ambassador to the United States, Gerónimo Gutiérrez, told reporters earlier this month that his government expected that there would be "either a solution or a very clear track to a solution" by the time the deal was signed. "It's been long and hard and we have taken a lot of barbs and a little abuse and we got there, it's great for all of our countries".
Despite Trump's hostile rhetoric about unauthorized immigrants crossing into the United States from Mexico, he appeared to be on better terms with that nation's president, Enrique Peña Nieto, who was serving his final day in office - and, in Trump's view, going out on a high note by signing the trade agreement.
While Trump hailed the revised trade pact, Trudeau was more measured, saying there was still work to be done and calling on Trump - using his first name - to remove steel and aluminum tariffs the USA imposed on Canada and Mexico. However, he lamented the deal doesn't remove tariffs on Canadian steel and aluminum, urging for more work to be done on this issue.
But Canada's refusal to sign the deal with the tariffs in place softened this week, said one insider: "At the end of the day, removing the uncertainty from the rest of the economy is too important to pass up".
President Donald Trump signed a trade deal with Mexico and Canada that will replace NAFTA and have wide-ranging effects on the auto industry. That could prove to be a hard task in the United States, especially now that Democrats - instead of Trump's Republicans - will control the House of Representatives come January.
Rep. Nancy Pelosi, who Democrats have nominated for House speaker next year, called the deal a "work in progress" on Friday. "With our signatures today we will formally declare the intention of our three countries to replace NAFTA with the USMCA".
Officials say differences sometimes emerge as lawyers seek to nail down language agreed upon by negotiators.
The deal, rebranded by Trump as "the U.S. -Mexico-Canada Agreement", contains new provisions governing e-commerce and cross-border data flows that were not part of the earlier treaty, which was negotiated before the Internet became a major commercial force.
The American-favoured acronym caused some puzzlement in the US when it was first unveiled on October 1.
"Our nations have also agreed to innovate new measures to ensure fair competition and promote high wages and higher wages for U.S. and North American workers, the. workers are tremendous beneficiary".
Trudeau's readout on the same call also mentioned lifting the tariffs the US imposed on steel and aluminum.