US President Donald Trump, Canada’s Prime Minister Justin Trudeau and Mexico’s President Enrique Pena Nieto signed a new trade agreement on Friday known as the United States-Mexico-Canada Agreement (USMCA), Reuters reported.

The leaders of the three countries agreed on a deal in principle to replace the North American Free Trade Agreement that governs 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.