Donald Trump's Mexico visit may have taken its first victim

Less than a week after a sudden visit by Donald Trump left Mexicans frustrated with their government, President Enrique Peña Nieto has shuffled his cabinet after the resignation of one of his closest advisers, Finance Minister Luis Videgaray.

The invitation extended to Trump was rumored to have been Videgaray's idea.

Reports cited by The Wall Street Journal indicate Videgaray told Peña Nieto that building ties with Trump could sooth unease in financial markets, an important concern given Trump's rhetoric and Mexico's recent economic doldrums.

The president did not give a reason for Videgaray's resignation during his announcement. Videgaray's office denied the visit was his idea, and Peña Nieto himself has taken responsibility for the invitation.

"He left because of Trump, no doubt," Viridiana Rios, a fellow at the Wilson Center and columnist for Mexican newspaper Excelsior, told Business Insider.

In the wake of the visit, which was widely seen as humiliating for the Mexican president, the cabinet was divided, with the foreign and interior ministries making plain their opposition to the visit, according to The Journal. Some now see Videgaray's departure as an attempt by Peña Nieto to shore up approval ratings that had sunk to new lows even before Trump set foot on Mexican soil.

The cabinet shake up was "the least [Peña Nieto] could do to try to recover some credibility given that he has 27 months left in power," Guillermo Valdés, a former chief of Mexico's intelligence agency, told The Journal.

"Mexico's federal government is now in full panic mode," Mexico-based journalist Jan-Albert Hootsen tweeted after the announcement. "No more continuity or new policy development; it's all about crisis management."

But Videgaray has long been close with Peña Nieto, counseling him since the latter was governor of the state of Mexico, Mexico's most populous state, from 2005 to 2011. And despite Videgaray vacating his post in the finance ministry, there is a strong possibility that he remains a close adviser to the president, Rios told Business Insider.

Videgaray's departure has necessitated a shuffling of posts in Peña Nieto's cabinet. The new finance minister will be José Antonio Meade, who served in the same role in 2011 and 2012 under Felipe Calderon, Peña Nieto's predecessor. Under Peña Nieto, who took office in 2012, Meade was foreign minister and headed the Social Development Ministry.

Mexico's President Enrique Pena Nieto with new Minister of Social Development Luis Enrique Miranda Nava and new Finance Minister Jose Antonio Meade, center, during the announcement of new cabinet members in Mexico City, September 7, 2016. REUTERS/Edgard Garrido

Luis Enrique Miranda, who was a deputy secretary at the Interior Ministry, will take over Meade's role at the Social Development Ministry.

Like Videgaray, Miranda has deep ties to Peña Nieto, serving as interior minister for Peña Nieto's government in Mexico state.

Miranda's new post underscores the suggestion that these moves are the president's attempt to bolster his administration in a time of turmoil.

"I read it as [Peña Nieto] putting a confidant into a key post," Carin Zissis, editor-in-chief of the Americas Society and Council of the Americas website, told Business Insider.

Miranda is part of Peña Nieto's "inner circle" of politicians from Mexico state, according to Zissis, who noted that Miranda's placement in the Social Development Ministry emphasizes "how close [Miranda and Peña Nieto] are."

For others, Miranda's appointment raises a red flag that Peña Nieto may be giving politics precedence over policy, signaling that cash-transfer programs, which are social-assistance initiatives that provide money to families on certain conditions, may be used for political ends, rather than to most effectively reduce poverty.

"What worries me most is the person they picked to be the minister of social development," Rios said. "He is a politician not an expert in poverty reduction. This shows [Peña Nieto] considers cash-transfer programs a political matter," not a policy issue.