MEXICO CITY (Reuters) - China and Mexico pledged on Monday to deepen ties at a meeting between their top diplomats following last month’s U.S. presidential election victory of Donald Trump, who has tested Washington’s relationship with both countries.

Mexico's Foreign Minister Claudia Ruiz Massieu (3rd L) and Chinese State Councilor Yang Jiechi (2nd R) attend a private meeting at the foreign ministry building (SRE), in Mexico City in this undated handout photo released to Reuters by the Mexican Foreign Ministry office on December 12, 2016. Mexico's Foreign Ministry office/Handout via REUTERS

Before arriving in Mexico on Sunday, Chinese State Councillor Yang Jiechi met with members of Trump’s team in New York, including his pick for national security adviser, retired Army Lieutenant General Michael Flynn.

Mexico has been exploring ways to lessen its economic dependence on the United States out of fear that access to its No. 1 trade partner will be restricted by policies under Trump, who promises to protect American jobs from going outside the country.

Yang’s meeting with Mexican Foreign Minister Claudia Ruiz Massieu included discussions of enhancing trade and investment ties, Mexico’s Foreign Ministry said in a statement, as well as improving flight connections between the two countries.

“They agreed to deepen mutual trust and develop the bilateral dialogue about subjects of mutual interest via the Mexico-China Strategic Dialogue,” the ministry said, without giving more details.

Yang said in the meeting that China’s comprehensive partnership with Mexico was “flourishing” day by day, adding that China wishes to deepen cooperation on trade, investment, resources, infrastructure and financial services, according to a statement on the Chinese foreign ministry website.

After his meeting with Ruiz Massieu, Yang had a “courtesy visit” with President Enrique Pena Nieto.

The Chinese government has bristled at Trump’s moves in recent days, protesting his decision to accept a telephone call from Taiwan’s president and voicing concern after a weekend interview on “Fox News Sunday” in which Trump questioned whether the United States had to stick with a “one China” policy. China considers Taiwan a renegade province.

Mexico’s relationship with China appeared to cool after Pena Nieto scrapped high-profile rail and retail projects that were supposed to usher in a new era of business between the manufacturing rivals.

But Mexico last week awarded two deepwater oil blocks to China’s Offshore Oil Corporation during a historic auction that was part of the country’s energy reform.

“The China-Mexico relationship is back on again,” said Evan Ellis, a research professor at the U.S. Army War College who specializes in China’s presence in Latin America.

“The election of President Trump and the associated threat to NAFTA probably was one driver for (Pena Nieto) to position Mexico to diversify its foreign economic engagements,” Ellis added.

Trump has vowed to renegotiate or scrap the North American Free Trade Agreement, a trade deal important to Mexico, which includes the United States and Canada. </s> Before arriving in Mexico on Sunday, Chinese State Councillor Yang Jiechi met with members of Trump's team in New York, including his pick for national security adviser, retired Army Lieutenant General Michael Flynn.

Mexico has been exploring ways to lessen its economic dependence on the United States out of fear that access to its No. 1 trade partner will be restricted by policies under Trump, who promises to protect American jobs from going outside the country.

Yang's meeting with Mexican Foreign Minister Claudia Ruiz Massieu included discussions of enhancing trade and investment ties, Mexico's Foreign Ministry said in a statement, as well as improving flight connections between the two countries.

"They agreed to deepen mutual trust and develop the bilateral dialogue about subjects of mutual interest via the Mexico-China Strategic Dialogue," the ministry said, without giving more details.

After his meeting with Ruiz Massieu, Yang had a "courtesy visit" with President Enrique Pena Nieto.

The Chinese government has bristled at Trump's moves in recent days, protesting his decision to accept a telephone call from Taiwan's president and voicing concern after a weekend interview on "Fox News Sunday" in which Trump questioned whether the United States had to stick with a "one China" policy. China considers Taiwan a renegade province.

Mexico's relationship with China appeared to cool after Pena Nieto scrapped high-profile rail and retail projects that were supposed to usher in a new era of business between the manufacturing rivals.

But Mexico last week awarded two deepwater oil blocks to China's Offshore Oil Corporation during a historic auction that was part of the country's energy reform.

"The China-Mexico relationship is back on again," said Evan Ellis, a research professor at the U.S. Army War College who specializes in China's presence in Latin America.

"The election of President Trump and the associated threat to NAFTA probably was one driver for (Pena Nieto) to position Mexico to diversify its foreign economic engagements," Ellis added.

Trump has vowed to renegotiate or scrap the North American Free Trade Agreement, a trade deal important to Mexico, which includes the United States and Canada. </s> US Secretary of State Rex Tillerson (R) is set to meet with Mexican President Enrique Pena Nieto to smooth over tensions (AFP Photo/PEDRO PARDO)

Mexico City (AFP) - US Secretary of State Rex Tillerson meets with Mexican leaders on Thursday to try to calm a row over President Donald Trump's trade and immigration policies.

Trump has outraged Mexico by vowing to build a wall along the border to keep out migrants, whom he branded rapists and criminals during his presidential campaign.

His government on Tuesday issued new orders to the authorities to begin arresting and deporting illegal immigrants, many of them Mexicans.

Trump has also threatened to put up barriers to Mexican exports, shift jobs from that country back to the United States and even halt remittances by US-based Mexicans back to their families.

Now he has sent Tillerson and Homeland Security Secretary John Kelly to Mexico City to smooth over tensions -- and discuss with Mexican Enrique Pena Nieto how to curb cross-border migration and drug-trafficking.

"It's significant that the president is sending the secretaries to Mexico so early in the administration. It's symbolic of the meaningful relationship that our two nations have," White House spokesman Sean Spicer told reporters on Wednesday.

"These are important meetings regarding the president's agenda to improve the quality of lives for both people of Mexico and the United States by combating drug traffickers and finding ways to bolster both our economies through a broader relationship that promotes commerce and legal immigration."

Tillerson and Kelly were scheduled to meet with Pena Nieto at 1900 GMT after talks with Mexico's ministers of foreign affairs, finance and government.

Trump's stance on Mexico has driven the countries' relations to their lowest point in years.

Pena Nieto canceled a planned meeting with Trump in Washington last month over the US leader's vow to make Mexico pay for the wall.

US government officials said Tillerson and Kelly will aim to convince Mexico that it values their bilateral ties.

Spicer insisted Mexico and Washington have "a very healthy and robust relationship with the Mexican government."

But Maureen Meyer, an expert at the Washington Office on Latin America, a US human rights advocacy organization, said "relations have been severely strained by the Trump administration's rhetoric and actions."

"Secretary Tillerson has an opportunity to set relations on a more sound footing based on mutual respect," she said in a statement.

The US immigration authorities have arrested hundreds of people across the country as part of Trump's pledge to crack down on illegal immigrants.

Kelly on Tuesday issued new orders to step up the detentions.

Speaking in Guatemala on Wednesday before traveling to Mexico, Kelly said "my sincere advice to any citizen considering moving to the United States in crossing our boundaries irregularly -- migration -- my best advice is to not do it."

Mexico has hinted it could use border cooperation as a bargaining chip.

"We have been a great ally to fight problems with migration, narcotics," Mexico's Economy Secretary Ildefonso Guajardo told the Canadian newspaper The Globe and Mail.

"If at some point in time things become so badly managed in the relationship, the incentives for the Mexican people to keep on cooperating in things that are at the heart of (US) national security issues will be diminished."

But Mexico has a lot to lose: it relies on the United States as a trading partner, sending 80 percent of its exports to its northern neighbor.

The United States has meanwhile allocated $2.6 billion worth of aid to Mexico for fighting crime under the 2008 "Merida initiative," US officials say.

Vowing to protect US industry, Trump has called for a renegotiation of the North Atlantic Free Trade Agreement with Mexico and Canada.

Pena Nieto has promised to defend Mexico's interests and called for respect from the United States.

"Neither confrontation nor submission: the solution is dialogue and negotiation," he said last month.

"Mexico does not believe in walls. Our country believes in bridges." </s> President Enrique Pea Nieto on Thursday called off a trip to Washington, after President Trump launched his plan to construct a border wall and insisted he would stick Mexico with the bill. The incident opened one of the most serious rifts in memory between the United States and its southern neighbor.

Trump spokesman Sean Spicer added a stunning new detail about the proposed wall project later Thursday, saying that Trump intended to pay for it by imposing a 20-percent tax on all imports from Mexico.

Pea Nieto had been scheduled to meet with Trump on Tuesday to discuss immigration, trade and drug-war cooperation. He called off the visit after Trump tweeted that it would be "better to cancel the upcoming meeting" if Mexico was unwilling to pay for the wall.

Trump's moves have rekindled old resentments in Mexico, a country that during its history has often felt bullied and threatened by its wealthier, more powerful neighbor. The legacy of heavy-handed U.S. behavior - which includes invasions and the seizure of significant Mexican lands — has mostly been played down by a generation of Mexican leaders who have pursued pragmatic policies and mutual economic interests with both Republican and Democratic U.S. administrations.

Both Pea Nieto and Spicer said that their countries were interested in maintaining positive relations. "We will keep the lines of communication open," Spicer told reporters in Washington on Thursday morning, adding that the White House would "look for a date to schedule something in the future." The Mexican president tweeted that his government was willing to work with the United States "to reach agreements that benefit both nations."

But Mexicans expressed shock and dismay as Trump moved to turn his campaign promises into reality.

Mexicans view a wall across the 2,000-mile border as a symbolic affront, part of a package of Trump policies that could cause the country serious economic pain. They include a crackdown on illegal immigrants, who send billions of dollars home, and renegotiation of the North American Free Trade Agreement, or NAFTA. The treaty has allowed trade between the neighbors to mushroom. Every day, $1.4 billion in goods ccross the U.S.-Mexico border, and millions of jobs are linked to trade on both sides. Mexico is the second largest customer for American-made products in the world, and 80 percent of Mexican exports - automobiles, flat screen TVs, avocados - are sold to the United States.

"When we are talking about building a wall, about deporting migrants, about eliminating sanctuary cities [for migrants], about threatening to end a free trade agreement, or to take away factories, we are really talking about causing human suffering," Margarita Zavala, a possible candidate for the presidency in 2018 and the wife of former president Felipe Calderon, said in an interview. "And after today, without a doubt, it is very difficult to negotiate from behind a wall."

Mexicans had trouble recalling a time when relations were this bad with the United States or when an American president appeared to be such a threat to Mexico's core interests.

"Never," former president Vicente Fox said in an interview, when asked if Mexico had faced a comparable U.S. president in his lifetime. "And I never thought the U.S. people would go for a president like this."

"We don't want the ugly American, which Trump represents: that imperial gringo that used to invade our country, that used to send the Marines, that used to put and take away presidents most everywhere in the world," Fox added. "That happened in the 20th century and this is what this guy is menacing us with."

Trump, for his part, faulted the Mexicans for damaging the relationship.

Addressing a GOP policy retreat in Philadelphia, Trump said Thursday afternoon, "The president of Mexico and myself have agreed to cancel our planned meeting" next Tuesday. "Unless Mexico is going to treat the United States fairly, with respect, such a meeting would be fruitless," he added.

It was not clear exactly how the Trump administration would impose the new tax on Mexican exports. But Spicer said it would be part of a broader plan to tax imports from countries with which the United States has a trade deficit, like Mexico.

"If you tax that $50 billion at 20 percent of imports - which is by the way a practice that 160 other countries do - right now our country's policy is to tax exports and let imports flow freely in, which is ridiculous," Spicer told reporters. "By doing it that we can do $10 billion a year and easily pay for the wall just through that mechanism alone. That's really going to provide the funding."

Pea Nieto's decision to cancel the trip came a day after Trump signed an executive order to construct a border wall, one of Trump's signature promises and a rallying cry for his supporters during last year's presidential campaign. Trump has insisted that Mexico will fund it, but Pea Nieto and other Mexican officials have angrily denied they will do so.

The timing of the order was seen as further insult: Foreign Minister Luis Videgaray was flying to Washington on Tuesday when news broke about Trump's impending border wall announcement. All Wednesday, speculation was rampant that Pea Nieto might cancel his upcoming trip.

In the meantime, Videgaray met at the White House with Craig Deare, who is in charge of Latin America on the National Security Council.

Throughout Trump's rise, Pea Nieto has been mostly respectful toward him, even inviting him to visit Mexico City as a candidate last August. Pea Nieto has tried to maintain a diplomatic approach to the new administration, suggesting that Mexico can negotiate with its largest trading partner and preserve good relations. On Wednesday night, Pea Nieto sent out a recorded message saying that he "regrets and disapproves" of the U.S. decision to move forward with the wall. He repeated that Mexico won't pay for the wall but he still planned to come to Washington to meet with Trump because of the importance of the negotiations.

But that decision changed after Trump's tweet on Thursday morning.

During a speech at a GOP policy retreat later in the day in Philadelphia, Trump described NAFTA as a "terrible deal, a total disaster for the United States," and said that the move of manufacturing to Mexico cost millions of American jobs and the closure of "thousands and thousands of plants" across the United States.

Rucker reported from Washington. Karen DeYoung, William Branigin, and Jenna Johnson in Washington and Gabriela Martinez in Mexico City contributed to this report. </s> Mexican President Enrique Peña Nieto has scrapped an upcoming meeting with President Donald Trump in the wake of fiery back-and-forth over which nation will pay for a border wall between the two nations.

"This morning we informed the White House that I will not attend the business meeting scheduled for next Tuesday with the @POTUS," Nieto tweeted.

Trump tweeted earlier Thursday that if Mexico refuses to pay for the wall it might be best to scrap their upcoming meeting.

Watch: Nieto tells Trump 'we do not believe in walls'

"The U.S. has a 60 billion dollar trade deficit with Mexico. It has been a one-sided deal from the beginning of NAFTA with massive numbers...," Trump tweeted. "If Mexico is unwilling to pay for the badly needed wall, then it would be better to cancel the upcoming meeting."

The deep divide over which country will fund Trump's promised wall along the U.S.-Mexican border — along with the White House's pledge to withhold federal funding from so-called "sanctuary cities" — raises the stakes in the talks.

Former Mexican President Vicente Fox in a video posted on Twitter implored Trump to rethink his position.

"Paisanos, @realDonaldTrump's reaction is one of fear," Fox wrote. "He's seen that México stands together and it's strong. Don't mess with us!"

A day earlier Trump, as he was unveiling his executive orders for ramped up immigration arrests and deportation and the border wall, threw in some praise for Mexico and Mexicans and declaring that the crisis on the border was due to a surge in Central Americans. During the presidential campaign, Trump's inflammatory rhetoric included calling Mexican immigrants "rapists" and accusing them of "bringing crime."

But Trump has also been threatening to reopen NAFTA, the trade agreement between Mexico, Canada and the U.S., to get a "better deal." He made that along with other trade deals the culprit for manufacturing job losses and other economic ills in the U.S.

Nieto had expressed interest in exploring the renegotiation of the 1994 agreement that predates advances in social media, telecommunications and other industries, to modernize it.

But facing some pressure at home and clearly disliking the orders from Trump, Nieto said in Spanish in a video posted on social media that Trump's wall was dividing the two nations.

He didn't explicitly say he was rethinking his visit to the U.S. next week, but said he would be speaking with elected officials and Mexico Cabinet members about the meeting.

Jon Farela, CEO of the Borderplex Alliance, a businees border development group, spent this week, speaking and visiting with members of Congress to provide evidence of how NAFTA has benefited both counties and areas for improvement.

"The quickest and surest way to destabilize the border is to remove jobs and hope because people will always find ways to provide for their families," said Farela, a conservative Republican and former New Mexico secretary of economic development who narrowly lost a congressional race in Albuquerque. </s> BUENOS AIRES (Reuters) - The United States, Canada and Mexico signed a North American trade pact on Friday, and President Donald Trump brushed aside difficulties he may have in getting the deal through U.S. Congress, where the opposition Democrats will control one of its two chambers from January.

The leaders of the three countries agreed on a deal in principle to govern more than a trillion dollars of mutual trade after a year and a half of acrimonious negotiations concluded with a late-night bargain just an hour before a deadline on Sept. 30.

Friday’s signing potentially ends a big source of irritation for the U.S. administration as it pivots to a much bigger trade fight with China that threatens the global economy. All eyes are on a meeting between Trump and Chinese President Xi Jinping on Saturday after a G20 summit in Buenos Aires.

Canada and Mexico bickered with the United States over the wording and the finer points of the trilateral deal and still had not agreed just hours before officials were due to sit down and sign it as the G20 summit kicks off in Buenos Aires.

“It’s been long and hard. We’ve taken a lot of barbs and a little abuse and we got there,” Trump said after the signing. “It’s been a battle and battles sometimes make great friendships.”

Canadian Prime Minister Justin Trudeau still had a few barbs of his own on Friday. He called the deal by its old name NAFTA, prodded Trump over U.S. steel and aluminum tariffs and said General Motors Co’s (GM.N) decision to cut production and its North American workforce, including in Canada, was a “heavy blow.”

“Donald, it’s all the more reason why we need to keep working to remove the tariffs on steel and aluminum between our two countries,” Trudeau said.

Mexico’s President Enrique Pena Nieto, who awarded Jared Kushner, Trump’s son-in-law and adviser, with Mexico’s highest order for foreigners, was warmer. On his last day in office, he said the new deal was forged with the “firm belief that we are stronger and more competitive.”

Legislators from the three countries still have to approve the pact, officially known as the United States-Mexico-Canada Agreement (USMCA), before it goes into effect and replaces the North American Free Trade Agreement (NAFTA).

But the U.S. trade landscape will shift significantly in January when Democrats take control of the U.S. House of Representatives in January after winning midterm elections in November. House Democratic Speaker Nancy Pelosi has pledged to “closely scrutinize” the new pact.

However, Trump and U.S. Trade Representative Robert Lighthizer said on Friday they were confident the agreement would pass Congress.

“It’s been so well reviewed I don’t expect to have very much of a problem,” Trump said.

Trump had vowed to revamp NAFTA during his 2016 presidential election campaign. He threatened to tear it up and withdraw the U.S. completely at times during the negotiation, which would have left trade between the three neighbors in disarray.

Trump forced Canada and Mexico to renegotiate the 24-year-old agreement because he said the existing pact encouraged U.S. companies to move jobs to low-wage Mexico.

U.S. objections to Canada’s protected internal market for dairy products was a major challenge facing negotiators during the talks, and Trump repeatedly demanded concessions and accused Canada of hurting U.S. farmers.

BDI, Germany’s main industry association, said in a statement the agreement’s rules on preferential origin for the automotive sector would be stricter and more complex, calling it “a retrograde step compared with NAFTA.” </s> U.S. Republican presidential nominee Donald Trump and Mexico's President Enrique Pena Nieto arrive for a press conference at the Los Pinos residence in Mexico City, Mexico, August 31, 2016.

MEXICO CITY (Reuters) - Mexico will need to show "enormous pragmatism" in its dealings with Donald Trump's government, President Enrique Pena Nieto said on Tuesday, as his administration prepares to seek common ground on trade and immigration issues.

Mexico is on tenterhooks awaiting the accession of Trump to the U.S. presidency because of his repeated threats on the campaign trail to impose tariffs on Mexican-made goods and seal the country off behind a massive border wall.

Acknowledging that Trump's victory had generated some uncertainty, Pena Nieto reiterated his government would pursue dialogue with the next U.S. government to reach agreements.

"We'll have to work with enormous pragmatism to agree what's useful and convenient for Mexico and for the whole of North America," he told a business summit in the central city of Puebla, Mexican headquarters of German carmaker Volkswagen (VOWG_p.DE).

The Mexican president added that his government was committed to providing macroeconomic stability for investors, listing a flexible exchange rate, central bank independence and a solid banking system among the key planks of his pledge.

Concern has been widespread among business leaders and officials in Mexico that Trump could follow through on threats to abandon the North American Free Trade Agreement (NAFTA) if he cannot renegotiate it in the United States' interests.

Struck between the United States, Mexico and Canada, NAFTA took effect in 1994 and has been the cornerstone of Mexican international trade policy. Mexico sends four-fifths of its goods exports to the United States.

Still, Mexican Economy Minister Ildefonso Guajardo believes Trump will not back out of NAFTA, and has said Mexico could add new chapters to the deal to update it. </s> BUENOS AIRES, Argentina — President Donald Trump joined the leaders of Canada and Mexico at a global meeting in Argentina on Friday (Nov. 30) to sign a revised North American trade pact, fulfilling a longstanding political promise with a deal he celebrated as a “groundbreaking achievement.”

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." However, ongoing differences over steel and aluminum tariffs the U.S. has imposed on its northern and southern neighbors encroached on the celebratory moment.

Trump 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 and we got there," Trump said of the pact. "It's great for all our countries."

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. Democrats and their allies in the labor movement are already demanding changes to the agreement.

Within hours of the signing, Senate Democratic Leader Chuck Schumer said that for the deal to get majority support in Congress, it must have stronger labor and environmental protections and "must prove to be a net benefit to middle-class families and working people."

While Trump hailed the revised trade pact, Trudeau was more measured and used the event to call on Trump to remove the steel and aluminum tariffs the U.S. slapped 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.

"With hard work, good will and determination I'm confident that we will get there," Trudeau said.

Pena Nieto, who will handoff to his successor Saturday, said he was honored to be at the signing on the last day of his administration, saying it is the culmination of a long process "that allow us to overcome differences and to conciliate our visions."

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.” </s> BUENOS AIRES: The United States, Canada and Mexico signed a North American trade pact on Friday, and President Donald Trump predicted an easy passage through U.S. Congress to approve the deal, despite opposition from some lawmakers.

The three leaders agreed on a deal in principle to govern the more than trillion dollars of mutual trade after a year and a half of acrimonious negotiations concluded with a late-night bargain just an hour before a deadline on Sept. 30.

Since then, the three sides have bickered over the wording and the finer points of the deal and still had not agreed just hours before officials were due to sit down and sign it as the G20 summit kicks off in Buenos Aires.

"It’s been long and hard. We’ve taken a lot of barbs and a little abuse and we got there," Trump said.

Legislators from the three countries still have to approve the pact, officially known as the United States-Mexico-Canada Agreement (USMCA), before it goes into effect and replaces the North American Free Trade Agreement (NAFTA).

But the U.S. trade landscape will shift significantly in January when Democrats take control of the U.S. House of Representatives after winning midterm elections in November. House Democratic Speaker Nancy Pelosi, has pledged to "closely scrutinize" the new pact.

However, Trump and U.S. Trade Representative Lightizer said they were confident the agreement would pass Congress.

"This was negotiated from the beginning to be a bipartisan agreement.... I think we’ll get the support of a lot of Democrats," he told reporters.

Canadian Prime Minister Justin Trudeau's spokesman only confirmed his attendance late on Thursday. Before signing the deal he continued to refer to as the new NAFTA, Trudeau told Trump the two should continue to work together to eliminate steel and aluminum tariffs.

Mexico's President Enrique Pena Nieto joined the ceremony on his last day in office.

Trump had vowed to revamp NAFTA during his 2016 presidential election campaign. He threatened to tear it up and withdraw the U.S. completely at times during the negotiation, which would have left trade between the three neighbors in disarray.

Trump forced Canada and Mexico to renegotiate the 24-year-old agreement because he said the existing pact encouraged U.S. companies to move jobs to low-wage Mexico.

U.S. objections to Canada's protected internal market for dairy products was a major challenge facing negotiators during the talks, and Trump repeatedly demanded concessions and accused Canada of hurting U.S. farmers.

BDI, Germany's main industry association, said in a statement the agreement's rules on preferential origin for the automotive sector would be stricter and more complex, calling it "a retrograde step compared with NAFTA."
Representatives from China and Mexico pledge to deepen ties between their countries as a reaction to Donald Trump's positions on trade.