As a handsome young politician named Enrique Peña Nieto ascended at lightning speed from state legislator to president of Mexico, Luis Videgaray was never far from his side.
"He was the president's most trusted advisor," said political analyst Alejandro Hope. "He has been his intellectual crutch for years."
So it was a great shock when Peña Nieto abruptly called a news conference Wednesday to announce that he had accepted Videgaray's resignation from his Cabinet. The president named Jose Antonio Meade, who previously served as finance minister under former President Felipe Calderón, as Videgaray's successor.
The sudden move has fueled furious speculation in Mexico, with some suggesting that Videgaray stepped down because of the controversial economic reforms he has pushed, and others blaming his role in another exceedingly unpopular political event:
Videgaray was a leading advocate for the Trump visit last week, believing it would send a signal of stability to the economic markets, a key priority for the Mexican government after two ratings agencies lowered their outlooks on Mexico from "stable" to "negative."
But the meeting was widely panned.
An overwhelming number of Mexicans say their opinion of Peña Nieto went down after he met with the Republican presidential candidate who has put attacking Mexican immigrants and criticizing trade deals at the center of his campaign. If the Mexican president's poll numbers were the first casualty, Videgaray may have been the second.
Videgaray's resignation "confirms that the decision to invite and receive Donald Trump was a historic error," financial analyst Raul Feliz said in a radio interview Wednesday.
Many are questioning what Peña Nieto will do without his closest advisor.
Without Videgaray, the president's office "is leaderless," wrote former Secretary of Foreign Affairs Jorge Castañeda on Twitter. "Who is going to govern?"
Indeed, Videgaray has been an essential part of Peña Nieto's team since the two met in the early 2000s. At the time, Videgaray was an investment banker. He asked to sit down with Peña Nieto, then a local legislator in the state of Mexico, for help changing some banking regulations.
When Peña Nieto was elected governor of the state of Mexico, he tapped Videgaray as his finance minister. He named Videgaray to the same post in the federal government after he won the presidency in 2012, reclaiming the office for the Institutional Revolutionary Party.
Videgaray, who has been described as more of a technocrat than a savvy political operative, was the architect of some of Peña Nieto's signature reforms, including changes that allow private investment in Mexico's state-owned oil and gas sectors and a series of tax hikes.
The tax increases were unpopular with many Mexicans and put Peña Nieto at odds with the business community. The energy reforms were less successful than they could have been because they coincided with a dramatic drop in the price of oil.
"Videgaray has had a tough run," said Christopher Wilson, deputy director of the Mexico Institute at the Wilson Center in Washington. "In the short term there was pain, and we're still waiting for the reward."
Wilson said he thinks Videgaray was right to shape a contingency plan for a possible Trump victory, given Trump's threat to exit the
"Eighty percent of Mexico's exports go to the United States," Wilson said. "If that is put at risk by the election in November, Mexico absolutely must be creating a strategy to minimize any harm. It absolutely makes sense to have open, clear lines of communication. The question is whether or not an invitation to both candidates was the best way to go about it."
Peña Nieto extended invitations to meet to Trump and his Democratic rival, Hillary Clinton, about to two weeks ago. According to Mexican media reports, he did so at the urging of Videgaray, and without consulting other Cabinet members.
His government seemed taken by surprise by Trump's quick acceptance of the invitation and the candidate's decision to fly to Mexico on the same day he was set to deliver a fiery speech in Arizona calling for an increase in immigration enforcement. Trump and Peña Nieto met privately for about an hour. They emerged with competing narratives about what was discussed, especially regarding whether or not Mexico would pay for construction of a border wall.
Peña Nieto has been widely mocked for the meeting, and some see Videgaray as an easy scapegoat. But analysts say it's possible Videgaray may have already been on his way out.
Given Peña Nieto's dismal poll numbers and his party's poor fairing in recent gubernatorial elections around the country, "there was a sense that the president needed to have a shake-up," said Ana Maria Salazar, a political analyst who worked at the
"There have been a number of developments that have weakened Videgaray, starting with the tax reforms, but the Trump visit was probably the last nail in his coffin," said Hope.
He and others expect Videgaray to remain in politics, possibly by running for governor in the state of Mexico. But a win would be hard, especially after Trump, Hope said.
"He has so many negatives that it would be an uphill battle."
At the news conference Wednesday, the long history and close bond between Vinegaray and Peña Nieto was clear. Videgaray at one point appeared to be blinking back tears as Peña Nieto announced his departure, and at the end of the speech, they shared a long embrace.
Cecilia Sanchez in the Times Mexico City bureau contributed to this report.
3 p.m.: This article has been updated throughout with details about the careers of Luis Videgaray and Enrique Peña Nieto.