The European Union and Japan have agreed on the outline of a free trade deal to create the world's biggest open economic area.
The deal was struck on the eve of a meeting of the world's top-20 economies in Hamburg, and was being billed as sending a message to the protectionist-minded President Trump.
"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 heads Donald Tusk and Jean-Claude Juncker.
Much of the detail of the agreement has yet to be finalised but Mr Abe said it was a "win-win" deal that was "a strong message to the world".
It has taken four years to negotiate and the aim is to have it in effect by 2019.
The prospect 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 concern at the US administration's shift away from multilateral open trading systems towards an aggressive "America First" policy.
One detail to be ironed out is how complaints from business over the treaty's application are dealt with, which is a touchy subject in Europe because of concerns that trade pacts give too much power to big multinationals.
EU tariffs of up to 10 percent on Japanese cars will be phased out over seven years, and tariffs on most EU food exports, including chocolate, cheeses and biscuits, will end over time.
Japan has been prominent in free trade over the past couple of years, and is leading efforts to try to save the Trans Pacific Partnership after the Trump Administration withdrew.
New Zealand is in the preliminary stages of negotiating a free trade agreement with the European Union.