Pope Francis launched a broadside against endemic corruption during his first visit to Mexico as pontiff, calling on President Enrique Pena Nieto and his government to combat it.

Corruption is deeply ingrained in Mexico, and Mr Pena Nieto, his wife and finance minister have all been embroiled in conflict of interest scandals involving homes purchased from government contractors.

The Pope also called on Mexico's bishops to take a more active stand against the drug trade, which he said "devours like a metastasis".

He told them to make it clear to drug dealers that they could not consider themselves good Catholics if their hands were "drenched in blood, but pockets filled with sordid money and their consciences deadened".

Drug-trafficking gangs have infiltrated police forces across the country and more than 100,000 people have been killed in drug violence over the last decade. Some 26,000 are missing.

"Experience teaches us that each time we seek the path of privilege or benefits for a few to the detriment of the good of all, sooner or later the life of society becomes a fertile soil for corruption, the drug trade, the exclusion of different cultures, violence and also human trafficking, kidnapping and death," the Pope said.

He said Mexico's leaders have a "particular duty" to move past corruption and violence and work for the collective good.

Speaking in his native Spanish before bishops inside the city's main cathedral, the Argentine-born pontiff urged religious leaders to do more to help migrants.

"Brothers, may your hearts be capable of following these men and women and reaching them beyond the borders," he said, calling on Mexico's church to strengthen its ties to the US episcopate.

The Pope has made migration one of the central issues of his papacy, and is due to end his visit to Mexico in the notorious northern border city of Ciudad Juarez, where he will meet relatives of victims of violence.