Pope Francis has apologised to victims of clerical sex abuse, acknowledging he had "wounded many" in comments defending a Chilean bishop who is under scrutiny.

But while the pope said he was sorry for his choice of words and tone of voice when he testily answered a reporter's question last Thursday in Chile, he also said he was certain that the prelate, Juan Barros, was innocent.

"I have to apologise," the pope told reporters aboard the plane returning to Rome from a week-long trip to Chile and Peru, saying he realised he had "wounded many people who were abused".

"I apologise to them if I hurt them without realising it, but it was a wound that I inflicted without meaning to," he said. "It pains me very much."

In the latest twist to a saga that has gripped Chile, Pope Francis said Bishop Barros, who is accused of protecting a notorious paedophile, would remain in his place in the diocese of Osorno because there currently was no credible evidence against him.

Last Thursday, a Chilean reporter managed to get close to the pope at the end of an event and shouted out a question about Bishop Barros.

"The day I see proof against Bishop Barros, then I will talk. There is not a single piece of evidence against him. It is all slander. Is that clear?" the pope replied.

His comments were seen as trying to dismiss the credibility of accusers and was widely criticised by victims, their advocates and newspaper editorials in Chile and the pope's native Argentina.

Meanwhile, Pope Francis has taken a tough stand against political corruption, and wrapped up his Latin American trip with a mass at an air base before more than a million people.

It was the second time since arriving in Peru on Thursday that the leader of the world's Catholics attacked the "virus" of corruption.

"There are exceptions. But by and large, Latin America's political culture is sicker than it is healthy," the pontiff told bishops 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?" the pope wondered aloud.

Leaders of other Latin American nations have also been accused of corruption.

"If we let ourselves be led by people who only speak the language of corruption, we are done for," the pontiff warned, using a popular Peruvian slang term and earning some laughter.

In his last homily the pope, who is 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," he said before departing for the Vatican.

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". 

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.