The agreement came after months of intense talks between EU and Mexican negotiators, and while some technical issues remain, an agreed text is expected by the end of the year.

"In less than two years the EU and Mexico have delivered a deal fit for the economic and political challenges of the 21st century," said EU Trade Commissioner Cecilia Malmstrom as the agreement was announced on Saturday. "Today's agreement also sends a strong message to other partners that it is possible to modernize existing trade relations when both partners share a clear belief in the merits of openness, and of free and fair trade."

EU Trade Commissioner Cecilia Malmstrom with Mexican Economy Minister Ildefonso Guajardo

Malmstrom's comments appeared to be directed at US President Donald Trump as he seeks to renegotiate the 1994 North American Free Trade Agreement (NAFTA), which he has said benefits Mexico at the expense of the US.

The EU has sought to frame itself as a leading defender of free trade in the face of US protectionism since plans for a trade agreement with the US were halted after Trump's election victory in November 2016.

A senior EU official said on Saturday the bloc will fight to ensure a permanent exemption from US steel and aluminum tariffs before a temporary reprieve expires on May 1.

The EU pact with Mexico is modelled on a recently agreed trade deal between Brussels and Canada.

Read more: Donald Trump snubs Latin American partners

Mexican president visits Hannover

German Chancellor Angela Merkel and Mexican President Enrique Pena Nieto reportedly wanted the deal to be announced before Sunday's opening ceremony of the Hannover Messe, a major trade fair in Germany, where both leaders will be present.

Pena Nieto arrived in Hannover on Saturday afternoon at the start of a five-day European visit. He said: "The modernization of this instrument broadens our markets and consolidates us as priority partners of one of the most important economic blocs in the world."

The modernized agreement between the EU and Mexico is expected to cover farm products, services, investment and government procurement and contain provisions regarding labor standards and environmental protection. It will also move into sectors such as finance and e-commerce and simplify customs procedures in pharmaceuticals and transport.

The EU, Latin America, Australia and Japan

The EU has announced plans to fast-track similar trade agreements with other states and starts talks with the Mercosur bloc of Argentina, Brazil, Paraguay and Uruguay this week.

The EU is also pursuing agreements with Australia and New Zealand and has already signed deals with Japan and Singapore.

Challenges to resolve

Issues to be resolved ahead of the final deal include Mexico's call for greater EU flexibility in importing cars only partly made in Mexico, and access for EU dairy products on the Mexican market.

Protecting appellations of origin of agricultural products is another key issue, with the EU demanding geographical indications be included on 340 EU foods and drink products sold in Mexico.

The EU also wants its companies to be able to bid in Mexican government tenders, including at the state level.

The EU and the US

European Commission Vice President Valdis Dombrovskis said the EU was in talks with US authorities over trade and tariffs. He said that the EU could retaliate with tariffs on $3.5 billion worth of American imports if US tariffs aren't removed permanently.

jbh/jm (AFP, Reuters, dpa)

Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.