How well the two men get on will determine whether fraught U.S. -Mexico relations improve from current tensions over migration, the North American Free Trade Agreement and Trump's demand that Mexico pay for a border wall.
President Trump says he is looking forward to a good relationship with Mexico's new president-elect.
Trump suggested that Mexico can help the United States "until we straighten out our immigration laws, which have been bad for many, many years, decades".
Speaking to reporters after his win, Lopez Obrador identified corruption as the "principal cause" of inequality and the criminal violence that has bedeviled Mexico for years, and said he would spare no one in his commitment to root it out.
In addition to calling President Trump "erratic and arrogant", a two-time failed presidential candidate published a book condemning Trump's plan to build a wall on the southern USA border.
Newly elected Mexico's President Andres Manuel Lopez Obrador, running for Juntos Haremos Historia party, cheers his supporters at the Zocalo Square after winning general elections, in Mexico City, on 1 July 2018.
President orders flags to half staff for journalist killings
Until 2016, when courts rejected a last round of his many appeals, Ramos pursued his claim that he had been wronged by the paper. A building housing The Capital Gazette newspaper's offices is seen at dawn, June 29, 2018 , in Annapolis, Md .
Lopez Obrador is estimated to have won between 53 and 59 percent of the vote. In his first loss - by a mere 0.56 percent to conservative Felipe Calderon in 2006 - his supporters held months-long protests in Mexico City and he referred to himself as "the legitimate president".
That violence was on many minds as television stations carried live images of Lopez Obrador weaving through Mexico City's notoriously chaotic traffic in the front passenger seat of a compact auto that was at least 5 years old.
She said a Lopez Obrador presidency is a good way to kick the ruling Institutional Revolutionary Party, or PRI, out of power. In fact, in the eyes of many Mexicans, Mexico has been too respectful. He said he will govern for the poor and fight rampant corruption, and also pulled back from promises to completely scrap energy and education reforms instituted by the Pena Nieto administration.
The election came amid a backdrop of mounting tensions between Mexico and the USA, which some analysts say have pushed relations between the two countries to one of the most divisive points in recent times.
Lopez Obrador struck a conciliatory tone in an acceptance speech Sunday night, saying he would pursue fiscal discipline and respect the independence of Mexico's central bank.
He said the 2019 budget will include increasing pensions for the elderly and funds for his other campaign promises. The victory came with a commanding lead for Lopez Obrador, showing a strong mandate for his policies.
Mercedes explains 'painful' Hamilton VSC blunder in Austrian GP
We will pick ourselves up in the next days, learn from our errors and go to Silverstone with our heads held high. This is the first time Mercedes have had a double non-finish since the 2016 Spanish Grand Prix .
Amid widespread frustrations with the status quo, all of the candidates have tried to paint themselves as the agent of real change. But it does represent a major shift - representing the largest margin of victory by any candidate in Mexican history.
Many Mexicans liked this rhetoric and saw in him a man who can stand up to Trump and reclaim the nation's dignity on the global arena.
According to the latest census figures, there are a little more than 26,000 people of Mexican descent living in Alaska.
Carlos Urzua, Lopez Obrador's pick to be his finance minister when he takes office on December 1, told Reuters on Monday that the new government will aim to reform the pension system and to reduce costs at Pemex during its six-year term.
"We won't do the dirty work of any foreign government", AMLO said, referring to detentions of Central American migrants trying to reach the United States border.
Trump asks Saudi Arabia to increase oil production
Iran's Supreme Leader Ayatollah Ali Khamenei on Saturday accused Washington of trying to turn Iranians against their government. Iran's rial currency has lost up to 40 per cent of its value since last month, when Trump pulled out of the nuclear deal.