Pope Francis took a tough stand against political corruption on Sunday, and wrapped up his Latin American trip with a mass at an air base before more than a million faithful.
It was the second time since arriving in Peru on Thursday that the leader of the world's Catholics attacked the "virus" of graft.
"There are exceptions. But by and large, Latin America's political culture is sicker than it is healthy," the pontiff told bishops earlier Sunday from across Peru, a country whose political parties and presidents have been plagued by dishonesty and kickbacks.
"What is wrong with Peru, that when one finishes being president one ends up behind bars?" Francis wondered aloud.
"(Ollanta) Humala, is in jail, (Alejandro) Toledo is in jail (living in US awaiting extradition);(Alberto) Fujimori was detained until just now; Alan Garcia, isn't sure if he's in or out: What is wrong morally?" he asked.
Leaders of other Latin American nations have also been accused of graft.
"If we let ourselves be led by people who only speak the language of corruption, we are done for," the Argentine pontiff warned, using a popular Peruvian slang term and earning some laughter.
Under a hot sun with a temperature around 25 C (77 F), plenty of thirsty worshipers made their way later to the air base, near a residential part of Lima's south end.
Numerous locals took the opportunity to turn their homes into pitstops offering water and soft drinks for the pilgrims.
One of them, Teofila Romero, 84, said the temperature was of no concern. She had already travelled from Puno, 1,500 kilometers (932 miles) away.
"I am here with my children. I don't care about the heat. I knew that we were just going to have to deal with the crowds and heat," Romero said, crammed between other faithful and souvenir sellers, in a crush of emotional believers.
In his last homily this pope, known for reaching out to people in the poorest slums, argued that there is no person without value, even if some are not treated as though they belong.
"There are a lot of people who are ... like half-citizens, while others are seen as urban overflow," Francis said before departing for Vatican City.
On the edge of Lima, where millions live in slums, he spoke of those "who live on the margins of our cities without conditions in which to live a humane existence."
Earlier Sunday, the 81-year-old pope delivered a homily to 500 nuns, and met with bishops.
The pontiff on Saturday had urged Latin America's faithful to fight rampant violent crime against women, comments which came during a mass in Peru's largest northern city of Trujillo.
"I wish to invite you to combat a plague across our Latin American region: the numerous cases of violent crimes against women, from beatings to rape to murder," Francis told the crowd.
Half of the 25 countries with the greatest number of murders of women are in Latin America, according to the UN Women agency.
While in Peru, the pope railed against "great business interests" for endangering the Amazon and its indigenous people and lashed out again at corruption in politics.
"There is so much damage done by this... thing that infects everything," Francis said. "And it's always the poorest and the environment that get the short end of the stick."
On Friday, he sounded a stark warning about the future of the rainforest and indigenous tribe members, saying they had "never been so threatened."
Thousands of indigenous people had traveled to meet the pontiff from throughout the Amazon basin region of Peru, Brazil and Bolivia to meet the pope in the Peruvian city of Puerto Maldonado.
Francis began his Latin American visit in Chile last Monday.
There, he highlighted the plight of vulnerable immigrants, apologized to victims of sexual abuse by Catholic priests, prayed with survivors of Augusto Pinochet's brutal dictatorship, and called for protection of Chile's persecuted indigenous people.