Leaders of the four countries have agreed to ask their finance ministries, in the first quarter of 2019, to come up with a plan which includes “programmes, projects, and specific actions, for the sake of jobs generation and poverty fight in the region.”

The programmes will be supported by an “integral development plan”, aimed at making the Central American nations a better place to live, and thus reduce the number of those leaving. It will be backed by CEPAL - the economic commission for Latin America and the Caribbean.

The deal was Mr Lopez Obrador’s first official act, and a highly significant one, likely to curry favour from his northern counterpart.

And Mr Lopez Obrador continued his conciliatory tone throughout the ceremonies on Saturday, thanking Mr Trump for sending his daughter Ivanka to represent him as a gesture of goodwill, and thanking Mike Pence, the vice president, for being there.

He then moved on to thank King Felipe of Spain and the assembled presidents for their presence – then giving a special mention to Jeremy Corbyn, his friend and ally of many years.

"Present today is my friend Jeremy Corbyn, leader of the Labour Party of Great Britain," Mr Lopez Obrador told the packed Chamber of Deputies, as Mr Corbyn stood up from his seat behind Ms Trump to wave and accept the applause.

Today I’m proud to attend the historic inauguration of Mexico’s new president @lopezobrador_ elected to bring justice and human rights to millions. He has shown how a progressive agenda of transformation can win and challenge the power of the few. pic.twitter.com/9G4pnBwa4X

More controversial to the assembled deputies and dignitaries was Nicolas Maduro, the Venezuelan president, who was forced to stay away from the ceremony owing to massive protests. When his name was mentioned, politicians yelled “dictator!” and marched to the front of the podium, unfurling a banner which read: “Nicolas Maduro, you are not welcome”.

Mr Maduro did, however, attend the lunch at the National Palace after the ceremony – arriving with a huge entourage, who were not permitted to enter, and then scuffled with security outside the building.

Inside the National Palace, Mr Maduro took a happy photo seated beside Cuba’s leader, Miguel Diaz-Canel, and Evo Morales of Bolivia – who earlier on Saturday held a bilateral meeting with Mr Corbyn.

White House Senior Advisor Ivanka Trump is seen at the Congress during the inauguration of Mexico's new President Andres Manuel Lopez Obrador, in Mexico CityCredit:
Reuters

The VIPs then feasted on huitlacoche soup – a classic Mexican fungus – followed by ribs with corn, Mexican spices and plantain, and a selection of Mexican desserts.

While the official celebrations were continuing, another of Mr Lopez Obrador’s policies was being enacted.

The presidential palace, Los Pinos, flung open its wrought-iron green gates and, for the first time in 80 years, was opened to the public.

Mr Lopez Obrador fulfilled his promise to turn it into a cultural centre – he will not live there, unlike his predecessors - and the sound of traditional music and orchestras flowed through the sprawling compound. Mexicans poured in to pose in front of the imposing gates, besides flower signs welcoming the public. Queues snaked through the lush gardens to get into the house where, until the day before, Enrique Pena Nieto and his family had lived and worked.

“I mean, I know they have to live well,” said one woman, entering the atrium beneath a huge chandelier. “But this is ridiculous.”

Visitors wait in line to enter the Miguel Aleman house at Los Pinos, the former official residence of the President of Mexico, in Mexico City,Credit:
Bloomberg

With more than a passing resemblance to the Iraqis who wandered freely through the deposed Saddam Hussein’s palace, Mexicans, jaws agape, passed through what was Mr Pena Nieto’s office, poked their head into his now unfurnished suite of bedrooms, and took selfies in his kitchen.

“This place is so huge, if I were hungry I’d faint before I reached the kitchen,” a little girl told her mother.

The new president proudly mentioned the development in his Saturday afternoon speech, addressing tens of thousands in Mexico City’s main plaza, the Zocalo.

“From this morning we’ve opened the doors of Los Pinos, which has ceased being a presidential palace, and is now a cultural space,” he said. “On Monday, the presidential jet is going. And all the flotilla of helicopters.”

He then listed the multitude of ways in which, from now, public servants will be held to account. His entire, extensive, social welfare plan is based on the simple idea of ending corruption.

“A lot of people are asking where we are going to get the money from,” he said. “We are going to free up so much funds, because corruption is over. There will no longer be luxury in government.”

Visitors walk down a foyer in the Miguel Aleman house at Los Pinos, the former official residence of the President of Mexico, in Mexico CityCredit:
Bloomberg

Trips abroad will be strictly curtailed, and chauffeurs removed for all but the most senior officials. Bodyguards will only be provided to those working in security; there will be no more private medical care, and computer systems and furnishings of offices can not be updated for at least the first year.

“No public servant can have servants paid for by the state,” he said. “No public servant can close streets, or park where they want,” he added – to rapturous applause.

Before beginning his 90 minute speech, he received a blessing from representatives of Mexico’s indigenous communities – an unprecedented and profoundly moving gesture.

He promised Mexicans he would not let them down.

But, he urged them to give him time.

“Have patience, and trust me,” he said. “Because they are handing me a broken country.”