Mexican President Enrique Peña Nieto named former finance minister Luis Videgaray as Mexico’s foreign minister on Wednesday, bringing back one of his closest aides just three months after he resigned for arranging a controversial visit by Donald Trump to Mexico.

The appointment of Videgaray, who Trump last year praised as a “brilliant finance minister” and “wonderful man,” signals the Mexican leader is preparing for a potentially contentious relationship with the incoming Trump administration.

Trump has repeatedly pledged to renegotiate the North American Free Trade Agreement (NAFTA), or possibly even withdraw from the trade pact, which also includes Canada.

An MIT-trained economist and former investment banker, Videgaray stepped down as finance minister in September. He never publicly offered a reason for his resignation, but it came during a public uproar in Mexico over the visit by Trump, then a Republican candidate for president.

A day after Videgaray resigned, Trump publicly praised him on Twitter. “Mexico has lost a brilliant finance minister and wonderful man who I know is highly respected by President Peña Nieto,” Trump said at the time. “With Luis, Mexico and the United States would have made wonderful deals together – where both Mexican and the US would have benefitted.”

Announcing Videgaray’s new role, the Mexican president said he had told him to “accelerate” contact with the Trump administration.

“The instruction to Mr. Videgaray is to accelerate dialogue so that from the first day the groundwork will be laid for a constructive working relationship,” Peña Nieto said. “It should be a relationship that allows us to strengthen our bilateral links on security, immigration, trade and investment issues.”

The appointment came a day after US carmaker Ford announced it was canceling plans to build a $1.6bn assembly plant in Mexico and instead would invest $700m in a new plant in Michigan. On Wednesday, the Mexican peso dropped to new lows against the dollar before Peña Nieto’s announcement.