German Chancellor Angela Merkel and Mexican President Enrique Pena Nieto, who both face trade tensions with US President Donald Trump, on Sunday praised an EU-Mexico deal to boost economic ties.

Pena Nieto also voiced "optimism" that Mexico could reach a deal to overhaul the North American Free Trade Agreement (NAFTA), which Trump has threatened to tear up if it is not revised to be more favourable to his country.

Merkel hailed as "truly good news for Europe, Germany and Mexico" the agreement "in principle" reached Saturday between Brussels and the Latin American country to modernize a 2000 free-trade deal, which is expected to be finalized by the end of the year.

"We know we face common challenges, and we believe that multilateral cooperation can be an added value for all," the leader of Europe's top economy said at the opening of the Hanover Fair on industrial technology, where Mexico is this year's partner country.

"And that's why we are working for free international trade based on common rules."

Pena Nieto said that Mexico, long a closed, protectionist economy, had changed into an open, export-based economy "integrated with the entire world", with 12 free trade deals that grant it access to 46 countries.

The Mexican leader said that "we have optimism as well that we're going to be concluding the renegotiation" of NAFTA, "ensuring benefits for all its partners".

Merkel and Pena Nieto will Monday again visit the Hannover Messe, the world's biggest industrial technology fair, where Mexico is the first Latin American partner country with exhibits by more than 110 companies and institutions.

Pena Nieto was also due to visit the Wolfsburg headquarters of German auto giant Volkswagen, which has its second-largest plant in Puebla, Mexico, before he continues his Europe visit in the Netherlands and Spain.

Merkel is due to visit Washington on Friday where, among several tricky issues, she will try to soothe tensions over Germany's large trade surplus with the United States.

Trump has also vowed punishing new US steel and aluminium tariffs, claiming foreign imports are harming US national security by undermining the domestic production needed for military readiness.

A temporary exemption for the largest foreign sources of the metals, including Mexico and Europe, is due to expire on May 1.