BRUSSELS — The European Union and Japan announced a broad agreement on Thursday that would lower barriers on virtually all the goods traded between them, a pointed challenge to President Trump on the eve of a summit meeting of world leaders in Germany.

Though the deal still needs further negotiation and approval before it can take effect, it represents an act of geopolitical theater, a day before a Group of 20 summit meeting begins in Hamburg. At a meeting of G-20 finance ministers in March, Steven Mnuchin, the United States Treasury secretary, pointedly declined to endorse a statement in favor of free trade.

“Although some are saying that the time of isolationism and disintegration is coming again, we are demonstrating that this is not the case,” Donald Tusk, the president of the European Council, said at a news conference in Brussels. “The world really doesn’t need to go a hundred years back in time. Quite the opposite.”

Prime Minister Shinzo Abe of Japan said the deal signified the creation of “the world’s largest free, advanced, industrialized economic zone.”