Pope Francis called on Mexico’s leaders on Saturday to provide "true justice" and security to citizens hit by drug violence as he addressed a National Palace packed with politicians.

With President Enrique Pena Nieto by his side, Francis invoked the country’s struggles against corruption and crime, one day after arriving on a five-day, cross-country tour of Mexico.

The pope told the assembled lawmakers and government officials that social, cultural and political leaders have a duty to help citizens "have real access to the material and spiritual goods which are indispensable: adequate housing, dignified employment, food, true justice, effective security, a healthy and peaceful environment." 

"Experience teaches us that each time we seek the path of privileges or benefits for a few to the detriment of the good of all … society becomes a fertile soil for corruption, drug trade, exclusion of different cultures, violence and also human trafficking, kidnapping and death, bringing suffering and slowing down development," he said.

It was the kind of message that many ordinary Mexicans, fed up with a decade of drug violence that has left more than 100,000 dead of missing, were hoping for.

Mexico was reminded of its troubles on the eve of the pope’s arrival, when 49 inmates were killed in a prison brawl between rival groups in the north of the country.

Thousands of Catholic faithful who stood outside the National Palace in the historic Zocalo square broke into cheers at the Argentine pontiff’s words.

"Bravo! How great that he tells the government the truth," one woman shouted.

"The pope put the government to shame with everything that he said. Let’s see if Pena Nieto does the right thing," said Ramiro Sosa, a 56-year-old shopkeeper from the crime-ridden eastern state of Veracruz.

Pena Nieto gave Pope Francis a red-carpet welcome at the ornate palace, a symbolic location as it is the seat of governments that were militantly secular throughout the 20th century.

Previous visiting popes, John Paul II and Benedict XVI, were not invited to the palace, which features a mural of Mexico’s history by communist painter Diego Rivera.

While Mexico is the world’s second most populous Catholic country after Brazil, diplomatic relations with the Vatican were only restored in 1992.

"It’s the first time that a pontiff is greeted at this historic place. This reflects the good relation between the Holy See and Mexico," Pena Nieto said.