Thirty years ago, as Donald Trump gave what is widely considered to be the first campaign speech of his career, he criticized one country above all for cheating the United States in trade: Japan.
On Thursday, Japan took on the mantle of the global rules-based trading system, as it sidestepped a failing trade agreement with the United States to forge a historic new pact with the European Union.
Leaders from Japan and the European Union on Thursday announced their agreement on the broad strokes of a trade deal that will cover nearly 30 percent of the global economy, 10 percent of the world’s population, and 40 percent of global trade.
The deal crafts a trading bloc roughly the same size as that established by the North American Free Trade Agreement, a 1994 deal between the United States, Mexico, and Canada.
Coming on the eve of the Group of 20 meeting of global leaders in Hamburg, the announcement appeared to be a calculated rebuke of both the United States, which has spurned global trade agreements in favor of more protectionist policies under President Trump, and Britain, which voted to leave the European Union last year.
Shinzo Abe, the prime minister of Japan, greeted the announcement as ‘‘the birth of the world’s largest free advanced industrialized economic zone.’’
‘‘Japan and the European Union will hoist the flag of free trade high amidst protectionist trends,’’ Abe said in a news conference Thursday.
Jean-Claude Juncker, the president of the European Commission, said the deal ‘‘shows that closing ourselves off from the world is not good for business, nor for the global economy, nor for workers. As far as we are concerned, there is no protection in protectionism.’’
The deal will lower trade barriers for a sweeping array of products, including pork, wine, cheese, and automobiles. The pact will also protect so-called geographical indications — products that derive their identity by being produced only in a specific region, like champagne or parmesan.
In a news conference Thursday, Juncker said that more than 90 percent of European exports to Japan will have freer terms of trade under the deal.
The deal will be a heavy blow to American producers of these goods, by making US-made goods relatively more expensive and less competitive in the major markets of Japan and Europe.
Because it contains firmer protections for data privacy that the European Union has long advocated, the deal could also run counter to the interests of major US technology companies and other multinationals, said Matthew Goodman of the Center for Strategic and International Studies. In past trade agreements, these companies have argued for the ability to freely move and store data around the world.
Talks over the deal have stretched over more than four years, in part because Japan was more focused on the Trans-Pacific Partnership, a 12-country trade deal that included the United States. But after Trump’s election last year, negotiations between Japan and Europe accelerated, as the countries saw that the United States might take a new posture on trade, said Goodman.
On his third day in office, Trump officially withdrew the United States from negotiations for the TPP. It was a blow to Abe and his party, who had invested much political capital in pushing the Pacific agreement forward.
On Thursday, Abe said that he would continue to push ahead with TPP negotiations without the United States in meetings with the remaining 11 countries next week, and that he would continue to try to persuade Trump of the TPP’s importance.
Trump has accused China, Germany, Japan, South Korea, and other countries of cheating on agreements with Washington and exporting more to the United States than they import from it. ‘‘The United States made some of the worst Trade Deals in world history. Why should we continue these deals with countries that do not help us?’’ Trump tweeted Wednesday.
The deal suggests that other countries are responding to the Trump administration’s protectionist rhetoric not by following suit, but by seeking other efforts at globalization and cooperation, said Chad Bown, a senior fellow at the Peterson Institute for International Economics.
‘‘These countries are now looking for an alternative path, given what’s happened with the Trump administration,’’ said Bown.
Europe and Japan have agreed to their trade deal only ‘‘in principle,’’ meaning they concur on its broad outlines. As such, the deal could still founder because of internal political opposition. At the news conference, Donald Tusk, president of the European Council, said the countries were aiming to bring the deal into force in early 2019.