BRUSSELS (AFP) -- Japanese Prime Minister Shinzo Abe and top EU officials agreed Thursday to the broad outline of a landmark trade deal, presented as a direct challenge to the protectionism championed by US President Donald Trump.
The breakthrough capped four years of talks and came on the eve of a G20 meeting in Germany at which Trump is expected to defend his "America First" stance on world trade.
"Today we agreed in principle on an Economic Partnership Agreement (with Japan), the impact of which goes far beyond our shores," European Commission chief Jean-Claude Juncker said at a joint press conference with Abe and EU President Donald Tusk in Brussels.
The EU and Japanese economies combined account for more than a quarter of global output, making the deal one of the biggest trade pacts ever.
"We were able to demonstrate a strong political will so that the EU and Japan take the lead on free trade,", Abe said just hours before he was due to meet Trump at the G20 in Hamburg.
With the deal, the EU is seeking access to one of the world's richest markets, while Japan hopes to jump-start an economy that has struggled to find solid growth for more than a decade.
Japan is also hoping to seize an opportunity after the failure of the 12-nation Trans-Pacific Partnership (TPP), torpedoed in January by Trump.
The "political agreement" on the trade deal covers some of the accord's toughest aspects but leaves aside details that could still prove difficult.
At the heart of the deal is an agreement for the EU to open its market to the world-leading Japanese auto industry, with Tokyo in return scrapping barriers to EU farming products, especially dairy.
EU officials insist that the deal will be a major boon for European farmers who would gain access to a huge market that appreciates European products.
Left untouched for now is the issue of controversial investment courts which have stoked opposition to trade deals in the EU nations, including Germany and France.
"After hard negotiations, the EU and Japan are sending a very positive signal to the world," said Markus J. Beyrer, Director General of BusinessEurope, a Brussels-based lobby.
"We are asking the G20 to take action against protectionism and this is a concrete example of how this could be done," he added.
Anti-free trade activists meanwhile furiously criticised the mooted deal, calling it a dangerous sop to multinationals.
"This trade deal, and others like it, smack of corporate protectionism at the expense of democracy and the environment," Greenpeace trade campaigner Kees Kodde.
Last year, the EU's giant CETA trade deal with Canada nearly sank on such concerns when the small Belgian region of Wallonia threatened to veto it, before eventually relenting.
Most opposition is centered on the investment courts, a controversial measure designed to resolve commercial disputes.
They have come under fierce opposition in Europe and the EU is trying -- so far unsuccessfully -- to persuade partners to adopt a new system staffed by public officials.
Divisions within the EU over the issue could prove significant when the EU-Japan deal faces ratification in the bloc's more than 30 regional and national parliaments.
EU officials said they hoped to implement the deal in January 2019.