By Steve Kingstone
BBC News, Sao Paulo
In Catholic Brazil, the tributes to Pope John Paul II are flowing.
John Paul II was often out of step with Brazil on moral issues
At a special Mass on Sunday in Sao Paulo's Roman Catholic cathedral, the late pontiff was described as "the people's Pope" - and no other country has more Catholics, 125 million of them at the last official count.
He was "the Pope of the young, the Pope of the poor, the Pope of the family," said Dom Benedito Beni dos Santos in his homily.
"The acts of his papacy, his written words, his apostolic travels - he visited 132 countries - all this expresses the passion that he had for Christ," he added.
Out of step
But not everybody in Brazil sees this papacy in quite such rosy terms. John Paul II was often out of step with Brazil on moral issues and he was also controversial politically.
When he became Pope, Brazil was in the grips of military dictatorship. Many priests hoped the Pope would lead the push for democracy - much as he did in his native Poland.
But instead, he distanced the Church from politics and censured leading exponents of Liberation Theology - a school of thought which argued Catholicism should openly take the side of the poor.
To the Pope, that sounded Marxist.
"Initially, he said liberation theology was necessary to the Church throughout the world," said Fernando Altmeyer, a lecturer at Sao Paulo's Catholic University.
"Then, the Pope became more dogmatic, harder on the Brazilian Church."
And then there was his strict adherence to Church doctrine on issues such as contraception, homosexuality and abortion - a stance which provoked opposition from many quarters.
"I think this Pope was not sensitive to women's reality," said Maria Jose Rosado, who runs a religious pressure group called Catholics for the Right to Choose.
"The declarations of this papacy against women, against feminism, against priesthood for women, against abortion, against condoms - he just repeated obstructive principles."
Given the controversies about John Paul II, some Brazilians are asking whether one of their own might do better.
The Archbishop of Sao Paulo, Cardinal Claudio Hummes, is one of those being mentioned as a potential successor.
Speaking to journalists on Friday, he said the Church needed to find answers to big new questions such as the debate over stem-cell research.
Cardinal Claudio Hummes has been mentioned as a possible successor
It sounded like a pitch for a new job.
But the archbishop hastily added that at this stage all cardinals were candidates to be the next pope.
Brazil is saying goodbye to Pope John Paul II with perhaps less emotion than might be expected from the world's leading Catholic population.
But the simple reality is that this country is staring inwards at its own problems - notably violent crime and economic inequality - problems that will persist whoever sits in the Vatican.