Japan and the European Union have agreed a free trade pact to create the world's biggest open economic area and signal resistance to what they see as US President Donald Trump's protectionist turn.
Concluded in Brussels on Thursday on the eve of meetings with Mr Trump at a summit in Hamburg, the "political agreement" between two economies accounting for a third of global GDP is heavy with symbolism.
It leaves some areas of negotiation still to be finished, although officials insist the key snags have been overcome.
"Ahead of the G20 summit tomorrow, I believe Japan and the EU are demonstrating our strong political will to fly the flag for free trade against a shift toward protectionism," Japanese Prime Minister Shinzo Abe told a joint news conference with EU institutional chiefs Donald Tusk and Jean-Claude Juncker.
The "win-win" deal was, Mr Abe said, "a strong message to the world".
In the works for four years, it has been pushed over the line towards a final treaty signature in the coming months by the election of Mr Trump and his moves to ditch a Pacific trade pact that included Japan, Australia, New Zealand and other nations and leave talks with the EU in limbo.
"Although some are saying that the time of isolationism and disintegration is coming again, we are demonstrating that this is not the case," European Council President Tusk said.
Juncker, president of the executive European Commission, played down prospects of any further negotiating problems and said he hoped the treaty could go into effect early in 2019.
Fears of cheaper import competition for European carmakers and Japanese dairy producers were among the thorniest issues, but officials said the two sides were driven by a shared alarm at Mr Trump's apparent shift away from multilateral open trading systems towards an aggressive "America First" policy.
Tariffs on much of their bilateral trade - which Abe noted accounts for some 40 percent of total international commerce - will be phased out over some years, and other economic areas, such as Japan's public tender system, will be opened up.
European farm lobby Copa-Cogeca called it "good news". Wine exporters alone should save €134 million a year in duty and no longer be at a big disadvantage to US and Australian wineries.
The Japan Business Council in Europe said it would create "mutual prosperity". The Japan Automobile Manufacturers Association also welcomed it.
One detail to be ironed out is how complaints from business over how authorities apply the treaty will be dealt with. That is a touchy subject in Europe due to concerns that trade pacts give too much power to big multinationals.