BUENOS AIRES, Argentina (AP) — President Donald Trump joined the leaders of Canada and Mexico at a global meeting in Argentina on Friday to sign a revised North American trade pact that he called “groundbreaking” and a benefit for “working people.”

The U.S.-Mexico-Canada Agreement is meant to replace the 24-year-old North American Free Trade Agreement, which Trump has long denigrated as a “disaster.”

He appeared with Canadian Prime Minister Justin Trudeau and outgoing Mexican President Enrique Pena Nieto at the Group of 20 nations summit in Buenos Aires for the formal signing ceremony. Each country’s legislature must also approve the agreement.

“It’s been long and hard. We’ve taken a lot of barbs and a little abuse, but we got there,” Trump said of the pact.

ASSOCIATED PRESS

Legislative approval is the next step in the process, but could prove to be a difficult task in the United States, especially now that Democrats — instead of Trump’s Republicans — will control the House of Representatives come January. Already Democrats and their allies in the labor movement are demanding changes to the 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 U.S. imposed on Canada and Mexico. Trudeau also referenced recent downsizing by General Motors in North America as a “heavy blow.” Trump did not mention the job losses.

The signing came at the front end of two days of tough diplomacy for Trump. On the top of his agenda is a Saturday dinner meeting with Chinese President Xi Jingping. which will determine if the two can ease escalating trade tensions. Before Trump arrived in Argentina he injected additional drama into the proceedings by canceling another high-stakes meeting, with Russian President Vladimir Putin.

On Friday, Trump opened the day with a cordial meeting at the Casa Rosada with Argentine President Mauricio Macri, a longtime business acquaintance. Posing for photos in the gilded Salón Blanco, Trump spoke about their longtime personal relationship and said they would discuss trade, military purchases and other issues.

“We’ve known each other a long while,” Trump said, noting he worked with Macri’s father on real estate developments. The businessman-turned-politician joked that when he and Macri first met they’d never have imagined their future roles on the world stage.

Macri is hosting the summit as he struggles with problems at home. He is trying to halt economic turmoil that has caused the steep depreciation of the Argentine peso.

Trump, who arrived in Buenos Aires late Thursday, barreled into the two-day meeting by announcing via Twitter that he was canceling a planned meeting with Russian President Vladimir Putin over Russia’s seizure of Ukrainian vessels. His agenda for the weekend includes meetings with world leaders, as well as a number of heavily choreographed group activities for the gathering of leaders of rich and developing nations.

Trump faces a series of diplomatic challenges over the weekend, most notably whether he can strike an agreement with Xi.

The president canceled on Putin not long after his former lawyer, Michael Cohen, revealed he had lied to Congress to cover up that he was negotiating a real estate deal in Moscow on Trump’s behalf during the Republican presidential primary in 2016. The news ensured any meeting with Putin would have put a spotlight on the special counsel’s investigation into whether the Trump campaign colluded with Moscow during the campaign. Trump has denied any wrongdoing.

Trump showed that the Russia investigation was testing his ability to stay focused on summit business after he blasted the investigation in a fresh tweet on Friday, again calling it a “Witch Hunt!”

One looming question is whether Trump will have a run-in with Saudi Arabian Crown Prince Mohammed bin Salman amid global dismay over the murder of Saudi journalist Jamal Khashoggi. U.S. intelligence officials have concluded that the Saudi crown prince must have at least known of the plot to kill Khashoggi, who was critical of the Saudi royal family. Lawmakers in both parties have called on Trump to at least avoid the young heir apparent as punishment.

But Trump publicly announced his decision to effectively give the prince a pass in the name of “America First,” making vastly exaggerated claims of Saudi military contracts and investments in the United States. The president also views Saudi Arabia as a vital counterbalance to Iranian influence in the Middle East.

Asked Thursday why the two had no meeting scheduled, Trump said: “I would have met with him but we didn’t set that one up.”

With his “America First” approach, general distaste for multinational deals and habit of insulting allies, Trump typically gets a mixed reception at global gatherings.

Trump has slapped tariffs on the European Union, pulled the U.S. out of the landmark Paris Climate Accord and the Iran nuclear deal and suggested he might be willing to pull the U.S. out of NATO if member countries don’t significantly boost their defense spending.