Trade Commissioner Cecilia Malmström pictured after previous trade talks with Mexico in May last year. | Pedro Pardo/AFP via Getty Images Mexico’s EU trade deal lands a punch on Trump Accord with Brussels comes as Washington squeezes Latin American country in NAFTA talks.

Mexico delivered a defiant political riposte to U.S. President Donald Trump on Saturday by agreeing a trade deal with the EU.

Trump's push to renegotiate the North American Free Trade Agreement helped catalyze Mexico's talks with Brussels over the past year, as the Latin American country sought to diversify away from dependence on an increasingly hostile U.S.

Diplomats said German Chancellor Angela Merkel and Mexican President Enrique Peña Nieto had given instructions that negotiators should attempt to seal an agreement before Sunday's opening ceremony of the Hannover Messe, a major trade fair in Germany, where both will be present. Mexico is the partner country of the event this year.

The deal is a major upgrade of an original accord struck in 2000, which covered basic goods and machinery. The new pact will branch out into sectors such as finance, e-commerce and agriculture.

Peña Nieto said the agreement "confirms us as priority partners of one of the most important economic blocs in the world."

Saturday's deal was an "agreement in principle," which means it will still need fine-tuning in the coming months.

In a thinly veiled side-swipe at Trump's protectionism, EU Trade Commissioner Cecilia Malmström said that such deals were possible when "both partners share a clear belief in the merits of openness, and of free and fair trade."

She added that it was an accord "fit for the economic and political challenges of the 21st century."

A statement from the EU said that the deal would ensure almost entirely tariff-free trade in all goods, including agricultural products, while simplifying customs procedures in sectors such as pharmaceuticals and transport.

Agriculture Commissioner Phil Hogan, who was involved in the negotiations, said the upgraded accord would be "very positive" for Europe's food sector.

While a deal with Europe has heavy political significance, Trump's renegotiation of NAFTA has far greater economic consequences for Mexico. The country exported some $340 billion of goods and services to the U.S. last year, but only €28.8 billion worth to the EU.

Political deal

Saturday's deal was an "agreement in principle," which means it will still need fine-tuning in the coming months.

A breakthrough had seemed tantalizingly close at the end of 2017 but negotiators failed to bridge differences over the local content requirements in cars and protections for Europe's gourmet food labels.

Talks moved up a gear this week, however. Europe's chief negotiator Helena König and her Mexican counterpart César Guerra kicked off marathon talks on Monday. On Wednesday, Mexican Trade Undersecretary Juan Carlos Baker arrived in Brussels to offer more political impetus in discussions with the EU trade department's director general, Jean-Luc Demarty.

Discussions over local content had proved extremely difficult until the very last moment. The EU insisted that 55 percent of vehicles must be made out of parts and materials from Europe or Mexico, while Mexico demanded more flexibility on using foreign content such as components from the United States.

The discussions had been complicated by the ongoing NAFTA negotiation between Mexico, the United States and Canada, in which Washington has made tough demands for a higher percentage of car parts being produced on U.S. soil.

In their talks with the EU on agriculture, the Mexicans demanded better market access for beef — naturally a difficult request for some EU countries, such as France and Ireland. The Mexicans, in return, were struggling with the EU's desire to lift barriers on dairy exports like cheese and milk powder.

The EU also said it would be able to greatly expand its pork exports.

Europe's request to include geographical indications also proved as a thorny issue. The U.S. had long lobbied Mexico to not accept the system, which protects iconic food names such as Champagne that can only be sold under the original name if they come from the respective producing region.

Mexico finally accepted the concept. The Commission said the final deal would offer protection from copies for 340 distinctive European foods and drink products in Mexico such as Queijo São Jorge cheese from Portugal and Szegedi szalámi from Hungary.