President Enrique Pena Nieto, addresses the audience during the XVI Summit of Heads of State and Government of the Tuxtla Mechanism for Dialogue and Coordination in San Jose, Costa Rica March 29, 2017. REUTERS/Randall Campos

MEXICO CITY (Reuters) - Mexican President Enrique Pena Nieto and Canadian Prime Minister Justin Trudeau spoke on Thursday about the NAFTA trade deal and agreed there was an opportunity to update the accord to the mutual benefit of all signatories, the Mexican government said.

In a statement, Pena Nieto’s office said he and Trudeau had spoken on Thursday afternoon and were ready to begin the process of dialogue between Mexico, Canada and the United States, the members of the North American Free Trade Agreement (NAFTA).

“Finally, they agreed to remain in close contact to ensure the process of (NAFTA) modernization is successful for the benefit of both nations,” Pena Nieto’s office said.

U.S. President Donald Trump rattled Mexico and Canada on Wednesday when his administration said he had been considering an executive order to withdraw from NAFTA. On Thursday, Trump said that he aimed to renegotiate the deal with the two.