NAFTA, the $1.2 trillion agreement that has governed trade among the U.S., Canada and Mexico for the last quarter century, has gotten a sorely needed update that should provide certainty and durability to continued free trade among the nations, along with protections for intellectual property and digital trade that the old agreement lacked.

The months since President Donald Trump declared war on NAFTA and launched a near-global trade war haven't been easy ones, particularly for Minnesota farmers and others who have borne the brunt of retaliatory tariffs. The new agreement won't take away all that pain. Still unresolved are the trade hostilities with China, one of Minnesota's largest trading partners and one that has resisted attempts to curb its freewheeling piracy of trade secrets and other infringements. Adding to the pain was the drama that accompanied Trump's attempts at deal making, complete with frequent insults and declarations to pull out of NAFTA altogether or, alternately, dump either Mexico or Canada, depending on the week.

Some will say all the sturm und drang was worth it, that the president's hardball tactics have resulted in a framework that is a considerable improvement over the old one. In addition to other advancements, the update will open dairy markets in Canada a crack — 3.59 percent — to the U.S., welcome news for Minnesota dairy farmers. A greater percentage of cars must be assembled in North America, and there are particular provisions that will result in higher wages for Mexican autoworkers and, unexpectedly, require that country to make it easier for those workers to join unions.

That also will serve to protect U.S. automotive workers by reducing the incentive to ship jobs to Mexico, where wages are a third of those of U.S. workers. There are provisions that will crack down on products that result from forced labor, and that address illegal and unsustainable fishery practices in international waters. American wines will be sold more broadly in Canada, and American financial services companies will get broader access to the Canadian market.

The new agreement, still to be ratified by the three governments, will also now be known as USMCA — an unpronounceable acronym for the U.S.-Mexico-Canada-Agreement, but a key feature for Trump, who was eager to shed NAFTA and rebrand any revised agreement.

Still, all this comes at a price. Damage was done to long-standing relationships with two countries that are this nation's closest neighbors and have been its most reliable trading partners and strong allies. The ability of a nation as wealthy and powerful as the U.S. to browbeat a few concessions out of other countries has never been in doubt. The question has always been whether doing so serves America's long-term interests as it seeks to preserve a measure of global stability and its own place as a world leader. The rough and even degrading treatment of the leaders of Mexico and Canada will not be soon forgotten by them — or others.

And while Trump is holding up USMCA as a template for future negotiations with China and others, it should be remembered that much of what is being praised was achieved the old-fashioned way — by careful, meticulous work from those in all three countries who had large portions of the agreement in place for months, and who held it together despite frequent presidential tantrums and chest-beating.

Meanwhile, the trade war with China, Europe and others rages on as Minnesota farmers wrestle with punitive tariffs on soybeans and pork, and companies such as Cargill and others warn that escalating trade conflicts could result in consequences that ripple across the globe.