Mexico's Finance Minister Luis Videgaray has resigned following a controversial visit by US presidential candidate Donald Trump, the ministry said on Wednesday.
Videgaray, one of President Enrique Pena Nieto's most trusted cabinet members, is thought to have played a key role in inviting Trump to Mexico at the start of September.
Pena Nieto came under fire at home for extending the invitation to Trump, who has been widely condemned by Mexicans angry at his history of anti-Mexican rhetoric.
In his presidential campaign, Trump has referred to Mexican immigrants as criminals and rapists and has proposed building a wall along the southern US border, saying Mexico will foot the bill.
Upon returning to the US after talks with Pena Nieto, Trump reiterated his hard-line policy proposals on illegal immigration and border security in a policy speech.
Pena Nieto's support has plummeted to just 29 per cent in polls, with his initial popularity in tatters after a presidential term plagued by scandals, human rights violations and a stagnating economy.
Despite the latest political gaffe, the president spoke fondly of Videgaray on Wednesday, commending the outgoing minister for his loyalty and hard work.
Pena Nieto added that Videgaray had been responsible for the most recent economic reform package, designed to raise tax revenues and ease access to credit.
The minister already made headlines in 2014 for purchasing a house from a company that was also a government contractor.
Videgaray is to be succeeded by Jose Antonio Meade, who served in a previous government under Pena Nieto.