López Obrador celebrates with his supporters in Mexico City after his win on July 1. Photo: PEDRO PARDO/AFP/Getty Images

Andrés Manuel López Obrador, the leftist former mayor of Mexico City, won Mexico’s presidential election by a large margin on Sunday, upsetting the nation’s political establishment. His party, Morena, did not exist during the last presidential election, and he defeated two other candidates from parties that have ruled Mexico for the past century. López Obrador ran on a message of tackling corruption and offering more government aid to the poor, and his double-digit win gives him a mandate to begin making dramatic changes.

Exit polls showed López Obrador, known as AMLO, with between 43 and 49 percent of the vote. His two main rivals, Ricardo Anaya and Jose Antonio Meade, conceded on Sunday, though the official results will not be in until Monday.

It’s unclear if Morena will capture a majority in Congress as well, which would make him the first Mexican president in more than two decades to have a legislative majority. Sunday’s elections were the largest in Mexico’s history with all 628 legislative seats and 3,400 other positions up for grabs. There was a massive amount of violence during the election, with roughly 130 candidates and campaign staffers assassinated.

President Enrique Peña Nieto did not run, as Mexican presidents are limited to one term, but he probably would not have fared well. Nieto’s term was marked by scandal and his approval rating dropped from 54 percent when he was elected in 2012 to 17 percent in January 2018.

This backlash against Nieto and his Institutional Revolutionary Party, which was in power from 1929 to 2000 before Nieto retook the presidency, along with the widespread violence and corruption, left Mexican voters open to an unconventional candidate. López Obrador, who ran for president twice before, has drawn stylistic comparisons to President Trump. Aside from upending the political establishment, AMLO’s message is “steeped in the language of nostalgia for a better time — and in a sense of economic nationalism that some fear could reverse important gains of the last 25 years,” as the New York Times reports. He’s also combative, suspicious of the media, and at 62, the oldest person elected president of Mexico since 1913.

In many other ways the two men are polar opposites, and AMLO’s election could ramp up tensions between the U.S. and Mexico. López Obrador eschews luxury and has promised to cut his own salary while raising the pay of the lowest government workers. He also campaigned on increasing pensions for the elderly, providing grants to university students, and creating a public-works program that will employ 2.3 million young people. (He claims this will all be funded by money saved from eliminating corruption, but critics say his numbers don’t add up.)

While none of the presidential candidates were pro-Trump, López Obrador got a boost by promising to stand up to the U.S. president when necessary. While AMLO has said he wants to preserve NAFTA and maintain good relations with the Trump administration, he previously criticized the trade agreement. Rafael Elias, an analyst at Exotix, told CNBC that he expects “a belligerent AMLO that would not hesitate to take a hard stance and could possibly derail the advances” of U.S. negotiators.

For now, Trump was cordial, but it seems we may be referring back to this tweet after López Obrador takes office on December 1.