– Andres Manuel López Obrador will be sworn in as president Dec. 1 with an unusually strong mandate from the Mexican people, who elected him in a landslide Sunday while also delivering his young leftist political party a large number of seats in Congress.

Still, many challenges lie ahead for López Obrador, whose populist campaign surged thanks to voter anger at rising violence and endemic corruption. Here's what he'll be up against:

A coming 'civil war'?

López Obrador, who ran and lost in 2006 and 2012, was successful this time because of the diverse groups he brought in to form his winning coalition. The coalition is made up of leftist intellectuals but also far-right evangelicals and old-time members of the long-ruling Institutional Revolutionary Party.

His test in the coming months will be balancing competing visions while holding the coalition together.

Still, many predict a civil war may be brewing among supporters.

An unpredictable neighbor

López Obrador has vowed to forge a relationship with the U.S. based on friendship. But President Donald Trump has used Mexico as a punching bag over the past several years, humiliating President Enrique Peña Nieto with his repeated vows to make Mexico pay for construction of a border wall.

Analysts say López Obrador and Trump have some things in common, including agreeing on some issues — raising wages and labor standards in Mexico — which could lead to agreements on priorities such as NAFTA.

NAFTA

The renegotiation of the North American Free Trade Agreement has been bumpy since Trump initiated its overhaul last year. Unlike Peña Nieto, López Obrador has doubts about the agreement.

But Trump and López Obrador will ultimately be looking out for his country's best interests. And Trump's hostile streak could torpedo the whole thing at any time. On Sunday, Trump issued threats against Mexico and Canada if they don't get on board with his plans. "If they're not fine, I'm going to tax their cars coming into America," he said.

Promises, promises

During his campaign, López Obrador promised expanded social programs for the sick and elderly and free higher education for all Mexican students. He vowed to bring peace to Mexico, to bring down gas prices and to stamp out corruption. But will he be able to achieve all that he has promised? For example, tackling corruption, a problem ingrained in nearly every aspect of Mexican civic life, will not be simple. Instead of laying out a clear plan, he has said that he will lead by example. But will that be enough?

Security

López Obrador isn't the first candidate to win in part by convincing voters that he can reduce violence. But since the launch of the drug war in 2006, none has succeeded. Last year, Mexico recorded more homicides than at any point in its modern history, and it is on track to break that record this year.

López Obrador has vowed to curtail violence by stamping out its root causes: poverty and lack of opportunity. But analysts question whether anti-poverty programs will be enough.

López Obrador has also floated the idea of offering amnesty to nonviolent drug criminals and a truth-and-reconciliation process. But those proposals are controversial.