Mexico and the European Union have reached a trade deal that virtually eliminates tariffs.

The wide-reaching deal will simplify the customs process and eliminate tariffs for "practically all" goods traded between EU-member nations and Mexico, according to an announcement posted Saturday by the European Commission.

Mexico and the EU said last year they would accelerate their talks to update a trade agreement signed in 2000 as the United States threatened to slap tariffs on Mexican imports and withdraw from NAFTA.

Related: China 'welcomes' Mnuchin's offer to hold trade talks in Beijing

Officials appeared to take a jab at US President Donald Trump's policies in statements praising the Mexico-EU deal as a defense of "open" and "rules-based" trade.

"Mexico and the EU worked together and reached a mutually beneficial outcome," said European Commission President Jean-Claude Juncker. "We did it as partners who are willing to discuss, to defend their interests while at the same time being willing to compromise to meet each other's expectations."

The deal marks a move by Mexico to pivot away from its reliance on trade with the United States.

Officials also say the agreement opens the door for companies in the European Union or Mexico to bid for government contracts abroad. It also outlines labor, safety and environmental safety standards.

Additional details about the agreement will still need to be hashed out before it becomes official.