Dorcas Gichane moved swiftly through the midday bustle of central Nairobi. High above her, a billboard advertising whisky suggested "Keep Walking". But Gichane, like hundreds of other devout Kenyans on their lunch breaks, had reached her destination – the Roman Catholic basilica of the Holy Family.

With a few minutes to spare before mass, some worshippers browsed in the bookshop. Others said a quick prayer in the stained-glass-and-brick "adoration room" where the notice board featured a poster depicting Jesus and his disciples – all of them black.

After sending a quick text message to a friend, Gichane, a well-dressed insurance broker, vanished inside the cavernous concrete cathedral, which was designated a basilica in 1982. Several large, flat-screen televisions hung from the pillars. A set of hand drums stood against the wall.

Like one in four Kenyans, Gichane is a Roman Catholic. She attends the 45-minute lunchtime mass each weekday, and goes to one of the five Kiswahili and English services every Sunday morning. "Many Kenyans went to Catholic schools, so the faith begins there," she says. "And a lot of hospitals are backed by the church."

The archbishop of Nairobi, Cardinal John Njue, offers a more spiritual explanation: "One scholar [Kenyan-born John S Mbiti, the author of a seminal work, African Religions and Philosophy] said that Africans are 'notoriously religious'. And that's true. It's very deep. It's not something that came from outside. It's natural. The missionaries did not bring us God, but a new relationship with God."

In Africa, the idea of Catholicism that seems to prevail in Western Europe – that of a reactionary, declining religion – seems incomprehensible. "The church is liberal," Gichane protests. "It has rules and regulations that are always there. But it does not place restrictions on people."

In Nigeria, Archbishop Matthew Ndagosa of Kaduna, looks out on a horizon that would dazzle his Western counterparts. "The churches are full. Young people go to church. And we have the world's largest seminary, in Enugu," he says, adding that the doctrines that cause Catholicism problems in the rich world strengthen its appeal in countries like Nigeria. "In our tradition, morals are very strong. The strong rulings – on abortion, condoms, homosexuality, etcetera – in the Catholic church are a natural match."

Africa's experience highlights several points that are at risk of being obscured in the controversy surrounding Pope Benedict's visit to an increasingly secular Britain. One is that, while Western Europeans may be abandoning religion, the rest of the globe is not. Muslims are not exactly turning away from Allah. The United States remains deeply religious. Millions of people in formerly communist Eastern Europe have re-embraced Orthodox Christianity. And in many parts of Asia, an emergent middle class is finding in organised religion a spiritual counterweight for its new-found wealth (and perhaps too a badge of social respectability).

According to the World Christian Database, the proportion of the planet's population professing one or other of its four biggest faiths (Christianity, Islam, Hinduism and Buddhism) rose steeply in the mid-1970s and has been climbing rapidly ever since. By 2005, the figure was 73%.

Strong in the developing world where birth rates are high, Catholicism has done well out of the contemporary "faith boom". Whatever problems Benedict may have, numbers are not yet among them. His church's statisticians estimate that the number of baptised Catholics reached 1,166 million at the end of 2008, a rise of 1.7% on a year earlier. Over the intervening 12 months, the Catholic population as a share of the global total edge up too.

The once-a-Catholic-always-a-Catholic method used for the Vatican's count is debatable: it takes no account of those who "lapse". But even by a more rigorous measure of belief and conviction, Benedict's religion is growing. The number of Catholic priests continues to rise, and in 2008 it reached almost 410,000. But while the number of aspirants to the priesthood grew that year in Africa, Asia and Oceania (and remained broadly stable in the Americas), it shrank – and at a striking rate of more than 4% – in Europe.

That points to Catholicism's outstanding challenge – the secularisation of its traditional heartland. This was the issue that weighed most heavily on the minds of the cardinals who gathered in Rome five years ago to elect a successor to John Paul II. They decided that the best man to tackle it would be the late pope's long-time collaborator, Joseph Ratzinger. And to make the point that he too saw the re-evangelisation of Europe as his top priority, the new pope took the name of the continent's patron saint.

Child abuse scandals



The impact is most clearly visible in the pope's native Germany where religious affiliation is officially registered so that the members of each denomination can pay for its upkeep. Figures published by the daily Die Welt in April showed that, in most dioceses, more than twice as many Catholics had left their church in the previous month than a year earlier.

But then the long-delayed revelations of priestly sex abuse have merely accentuated an existing trend. The German church had been dwindling for years: between 1990 and 2008, the number of registered Catholics fell by 11%.

Though the decline in other countries cannot be measured as precisely, it can be adduced from the visible evidence of poorly-attended services, half-empty seminaries and de-consecrated churches.Priests like Paul McCartney's Father McKenzie "writing the words of a sermon that no one will hear" can be found in sacristies from Galway to Graz. The only mitigating factor has been the growth of immigrant populations that, in many parts of Europe, are disproportionately Catholic. In Britain particularly, an influx of eastern Europeans, South Americans and West Africans has filled the pews, and even led to claims that Catholicism has overtaken Anglicanism as the leading national religion.

But evidence from Switzerland suggests the "immigration bonus" will be temporary. A study by the Schweizerisches Pastoralsoziologisches Institut three years ago found that, whereas in 1970 four-fifths of immigrants were Catholic, by 2000 the proportion had dropped to 44%. That was partly because a growing number of Switzerland's newcomers were from non-Catholic countries. But it also reflected a tendency identified in other countries for immigrants of all religions to give up their faith as they integrate into the increasingly secular societies of western Europe.

The departure from the Catholic church that has attracted greatest attention has been that of its most traditionalist wing. In 1988, a French archbishop, Marcel Lefebvre, the leader of the hyper-conservative Society of St Pius X, defied the Vatican by consecrating four bishops and earned for himself and his lieutenants a declaration from Rome that they had automatically excommunicated themselves.

Far more damaging in terms of numbers, however, has been the unremarked, unreported "lapsing" over the years of millions of ordinary Catholics whose faith has been stretched to breaking point by the contradiction between Vatican teaching and the everyday reality of their lives. John Paul II once decried their failure to respect the guidance of their spiritual leaders as "silent apostasy".

Christian Weisner of the progressive lay movement, Wir Sind Kirche, sees it differently. "The church leadership has lost contact with the church community," he argues. "It's not just secularisation that is responsible. And it's not society's fault that people don't go to church any more or that they don't pay church taxes any more. It's the church that has lost contact with them."

He points to two main areas of divergence. The first was created by Paul VI's 1968 encyclical, Humanae Vitae, which forbade artificial birth control. "This made many Catholics, including good Catholics, realise the church was not people-friendly," says Weisner. The second area he identifies is attitudes to women. The Vatican does not want them to marry its priests. Nor does it want women in the priesthood.

Striking evidence of the gap between the thinking of the leadership and the faithful came in a 1996 study by two American academics, Andrew Greeley and Michael Hout, who polled Catholics in the United States, the Philippines and four European countries. In America and all the European countries except Poland they found a majority supported not only married priests but women's ordination.This was true even of supposedly conservative Ireland and Italy. Backing for married priests in Ireland, at 82%, was higher than in any other country. In Italy, 58% wanted women priests.

What few hopes liberal, European Catholics may have harboured of a re-think on either issue have been stamped out this year. When in March one of his cardinals suggested that, in view of the sex abuse disclosures it might be time to revisit the question of priestly celibacy, Benedict swiftly responded with a speech lauding it as "an expression of the gift of oneself to God and others". Four months later, the Vatican announced it had bracketed the "attempted ordination" of women with clerical sex abuse as one of the gravest offences in church law.

Such moves imply monumental indifference to "political correctness" and to the sensitivities of many Catholics whose attachment to the church already hangs by a thread. But then, says Andrea Tornielli, the author of Attacco a Ratzinger, a newly-published account of Benedict's papacy, the pope "does not think of the re-Christianisation of Europe in terms of a military-style re-conquest. It is not a question of numbers". The key to his thinking, Tornielli believes, is his use of the phrase "creative minority". In a speech Benedict made last year in the Czech Republic, he argued that "it is usually creative minorities that determine the future and, in this regard, the Catholic church must understand that it is a creative minority which has a heritage of values that are not things of the past, but a very lively and relevant reality".

Some of Benedict's supporters believe he wants a smaller, but theologically more homogenous (and reactionary) group of true believers who can hunker down and wait for more propitious times. Tornielli thinks that is a misinterpretation. "The idea of a 'hard core' is essentially military and defensive. I think the pope simply believes that the only way to get the people of our times to encounter God is by bearing Christian witness, living Christian values. It is, after all, not so unlike what happened 2,000 years ago."

Seen in those terms, Britain is not such a hostile terrain for the pope as it might seem. His traditional brand of Christianity has already proved irresistible to some conservative Anglicans.

And when he talks of creative minorities, he may well be thinking of groups like the one behind Youth 2000, a five-day retreat for Catholics between the ages of 16 and 30 held at Walsingham over last Bank Holiday weekend. Around 1,000 people attended the event, to talk about holiness, prayer and the gospel.

The group's stated aim is to give young people "a gateway back to God". Father Stephen Wang, a London parish priest and dean of studies at Allen Hall seminary, says many young Catholics "want to be rooted in the Catholic faith, but want to bring it alive. Young people are searching for something more. It is not enough to be completely rootless. It is not enough in defining who you are." For earlier generations who grew up steeped in their faith, the challenge was not how to forge a Catholic identity, but a secular one. For contemporary young Catholics, the reverse was true. "These young Catholics want to deepen their interest in Catholic teaching, in Catholic worship, in Catholic morality," says Father Wang.

More than 5,000 miles away in Mexico City, a less intellectual approach to the faith is to be found inside the Basilica of Our Lady of Guadalupe. Parents with sick children, students awaiting exam results and farmers fearing bad harvests, all queue before a yellow tin box with a slit and a stencilled invitation to ask for a miracle. "My daughter was ill and, after we prayed, she got better. So we're here to give thanks," said 55-year-old Angela Garduno as she paused with her family at the miracle box, clutching a knee-high alabaster statue of the Virgin bought at the gift shop.

The basilica might seem to offer comfort to Benedict. Some 20 million people come every year to gaze at a cloak in which the Virgin Mary's image is supposedly imprinted. But in Mexico City there are signs of what the Vatican fears most – that the erosion of Catholicism in Europe could prove to be a foretaste of what awaits it elsewhere. Five centuries after Spanish missionaries turned Latin America into Rome's most loyal continent, the church's dominance is faltering. From the Rio Grande down through the Andes, souls and influence are slipping away.

Gay marriage row



Latin America remains steeped in Catholic tradition. Even Hugo Chavez's Marxist rhetoric is sprinkled with Catholic references. Abortion remains illegal in most countries. But Protestant evangelicals have converted millionsto a different brand of Christianity (some 15% of Latin Americans are estimated to be Protestant, with the proportion rising to 38% in El Salvador). And a secular tide is lapping at the church's foundations. An increasingly urban, educated population no longer genuflects before pulpit denunciations. "This isn't just a political struggle – it's a strategy to destroy God's plan," Cardinal Jorge Bergoglio, the head of the church in Argentina, said before a recent congressional vote on gay marriage. But the law passed, and the protests against it shrivelled. Chile's president, Sebastian Pinera, has promised more rights to same-sex couples. Dilma Rousseff, who is likely to be elected Brazil's president in October, favours legalising abortion.

"The obvious success of the Pentecostal churches has shot to hell the pretence that this is a Catholic continent," says David Stoll, a US anthropologist. "If I was the pope, Latin America would be a source of great distress." But, adding a qualification with which Benedict would no doubt agree, he says: "With fewer people you have the potential for more enthusiasm and participation."