(Bloomberg) -- Mexican President Andres Manuel Lopez Obrador’s first visit to the White House sealed an unlikely partnership with Donald Trump to launch a new phase in the relations between the neighbors amid criticism in the Latin American country.

In a speech that combined historic references with calls to deepen North American trade integration, Lopez Obrador effectively endorsed Trump’s treatment of Mexico. The U.S. president remains highly unpopular south of the border after having called the nation’s people criminals and rapists during the 2016 campaign and vowing to build a wall between the countries.

“I am here to tell the American people that their president treated us with kindness and respect,” AMLO, as the Mexican president is known, said in a joint statement at the White House’s Rose Garden on Wednesday. “You never sought to impose anything on us,” he said, referring to Trump.

The meeting caps a rapport between two figures of very dissimilar political backgrounds. At first sight, the 66-year leftist AMLO, who cut his political teeth as an activist for the rights of indigenous peoples in southern Mexico, has little in common with Trump, a New York real estate developer and reality television star.

While Lopez Obrador built his political career decrying widespread corruption and his country’s crony capitalists, Trump won office by stoking fears about immigration. Yet both are populists and nationalists who earned each others’ respect.

Read More: Mexico’s AMLO Flies Coach to Washington to Seal Trump Bet

The comments alongside the U.S. president also mark a reversal for Lopez Obrador, who before his election wrote a book called “Listen, Trump” and once accused him of using anti-Mexico rhetoric similar to the vilification seen in Adolf Hitler’s Germany.

He faced harsh criticism before the trip, with former diplomats and pundits warning he would become a pawn of Trump in his election campaign and alienate Democrat Joe Biden, who leads in most polls with the approach of the Nov. 3. vote. After the meeting, some Mexican commentators expressed surprise at AMLO’s deferential tone toward his counterpart.

“Maybe it was unavoidable that he went, but treating Trump as if he was equivalent to the U.S. nation? That wasn’t unavoidable. They could’ve been more careful,” said Carlos Bravo, an associate professor at the Center for Research & Teaching in Economics in Mexico City.

Following the bilateral meeting, Biden said on Twitter that he would work with Mexico “to restore dignity and humanity to our immigration system,” recalling Trump’s comments about Mexicans in the last presidential race.

Remaining Friends

From the start of his administration in late 2018, AMLO has sought to team up with Trump. He deployed a newly created national guard to crack down on the migration of Central Americans and others through Mexico after the U.S. president threatened last year to slap tariffs on Mexican goods.

The Mexican leader insisted this week’s trip was crucial in order to begin the new trade deal between the U.S., Mexico and Canada as a motor to fuel the economic recovery of the countries from the onslaught of the coronavirus pandemic. The agreement could allow North America to become stronger by expanding investment and trade within the bloc, he said.

Lopez Obrador, who holds rambling press conferences every weekday morning, stayed true to form in his presidency’s first trip abroad. While Trump spoke for about eight minutes, Lopez Obrador went on for nearly twice as long, with several references to the history of U.S.-Mexico relations. The meeting came after a morning visit to the Lincoln Memorial and a monument to Benito Juarez, the revered 19th century Mexican leader.

“We aren’t fighting, we are friends and we will remain friends,” Lopez Obrador said later on, in remarks to a smiling Trump before a White House dinner. “The predictions failed.”

©2020 Bloomberg L.P.