Claudia Sheinbaum will be sworn in on Tuesday as Mexico's first woman president, taking charge of the violence-plagued Latin American nation at a time of mounting security, economic and diplomatic challenges.
The 62-year-old former Mexico City mayor and ruling party heavyweight will face immediate tests from cartel violence, frictions with key international allies and a backlash against controversial judicial reforms.
A scientist by training, Sheinbaum won a landslide election victory in June with a pledge to continue the left-wing reform agenda of outgoing leader Andres Manuel Lopez Obrador, a close ally.
Sheinbaum's relations with the United States, Mexico's main trading partner and a key ally in areas including security and migration, will depend to a large extent on who wins the US election on November 5.
Sheinbaum could probably develop "a quite good relationship with Kamala Harris because they're very much alike," said Pamela Starr, a professor of political science and international relations at the University of Southern California.
"They're both women who will be the first female president of their countries. So they're both interested in advancing women's issues and women's rights. They're both very much on the same page when it comes to climate change. And they're both very much progressives," she said.
Relations with Donald Trump, if he wins, would "be much more difficult, in part because he doesn't have as much respect for female leaders as he does for male leaders," Starr said.
And because Sheinbaum is not a populist, "he won't see a kindred soul in her like he saw in Lopez Obrador," she added.
Trump's vow to deport significant numbers of undocumented people would present a major challenge for Mexican-US relations, according to experts.
In that case, "passions on both sides of the border will become inflamed and the relationship could be put to a severe test," said Michael Shifter, an expert at the Inter-American Dialogue think tank in Washington.
Even before taking office, Sheinbaum has found herself engulfed in a diplomatic row with Spain, another key economic partner, after she refused to invite King Felipe VI to her inauguration, accusing him of failing to acknowledge harm caused by colonization.
While Sheinbaum's presidency is unlikely to usher in a radical change of direction for the world's most populous Spanish-speaking country, home to 129 million people, she is expected to bring her own style of leadership, experts said.
"She's more pragmatic and less ideological than Lopez Obrador," Starr told AFP.
Lopez Obrador leaves office due to the country's single-term limit, enjoying an approval rating of around 70 percent.
He hands Sheinbaum the reins of a nation where murders and kidnappings occur daily and ultra-violent cartels involved in drug trafficking, people smuggling and other crimes control vast swaths of territory.
In the northwestern state of Sinaloa, cartel infighting has left dozens of people dead in recent weeks.
Gender-based violence is another major issue with around 10 women or girls murdered every day across the country.
"Sheinbaum's chief challenge will be tackling Mexico's deteriorating security situation," said Shifter.
"Lopez Obrador mainly relied on rhetoric to address spreading cartel activity, but Sheinbaum will likely be data-driven and technocratic in her approach to this vexing problem and will try to improve the effectiveness of the police," he added.
Lopez Obrador prioritized addressing the root causes of crime such as poverty and inequality -- a policy that he calls "hugs, not bullets."
In his final weeks in office, the self-proclaimed anti-corruption fighter pushed through controversial reforms including the election of all judges by popular vote.
Critics warned the changes would make it easier for politicians and organized crime to influence the courts.
The reforms upset foreign investors as well as key trade partners the United States and Canada.
Once in office, Sheinbaum is likely to seek ways to allay the concerns, Shifter said.
"By all accounts she is pragmatic and understands that Mexico cannot afford to antagonize both governments and alienate investors," he added.