RIO DE JANEIRO -- At one new megachurch in São Paulo, a Roman Catholic priest who was a personal trainer before joining the clergy energetically belts out songs, rock-star style, before 25,000 worshipers. Other Brazilian priests are donning cowboy hats and crooning country tunes at Mass or writing best-selling advice tomes emblazoned with heartthrob photographs on the cover.
If there is any place that captures the challenges facing Catholicism around the world it is Brazil, the country with the largest number of Catholics and a laboratory of sorts for the church's strategies for luring followers back into the fold.
Reflecting the shifting religious landscape that Pope Benedict XVI's successor will contend with, Brazil rivals the United States as the nation with the most Pentecostals, as a Catholic monolith gives way amid a surge in evangelical Protestant churches.
Despite the iconic statue of Christ that towers over this city, there is deep anxiety among some Catholics about the future of their faith given rising secularization and indifference to religion here. Only 65 percent of Brazilians now say they are Catholic, down from more than 90 percent in 1970, according to the 2010 census. The decline has been so steep and continuous, especially in Rio de Janeiro, that one of Brazil's top Catholic leaders, Cardinal Cláudio Hummes, has remarked, "We wonder with anxiety: how long will Brazil remain a Catholic country?"
Before Benedict announced that he would vacate the papacy at the end of the month, he had been expected to visit Rio in July for World Youth Day, a gathering of millions aimed at bolstering new generations of Catholics. Many of Brazil's faithful were hoping that the trip would represent a new focus by the Vatican on the double-barreled threat of evangelical competition and growing secularism.
Some here hold out hope that the new pope could still visit Rio early in his papacy, and are even encouraged that two Brazilians, Cardinal João Braz de Aviz and Odilo Scherer, the archbishop of São Paulo, are among those mentioned as possible candidates to succeed Benedict. But others seem resigned to what they describe as a combination of neglect and condescension from the Vatican.
"I think they're going to maintain the same line of Benedict," said Silvia Fernandes, a sociologist at the Federal Rural University of Rio de Janeiro who specializes in Catholicism.
Ms. Fernandes said that big schisms persisted within the church in Brazil, between bishops in the Amazon who are focused on human rights, illegal deforestation and indigenous struggles, and the more conservative and traditional Catholic leadership in relatively prosperous southeastern Brazil.
Then there is the array of singing priests who belong to what is called Brazil's Charismatic Catholic Renovation, a movement seeking to invigorate Catholic services with the kind of liveliness that parishioners often find at other churches. These priests have been embraced by the Vatican, but only to a point.
The most famous among them, the Rev. Marcelo Rossi, a 45-year-old former personal trainer, has sold more than 12 million CD's and has celebrated Mass in a soccer stadium filled with tens of thousands of worshipers. Still, he complained about feeling "humiliated" during Benedict's visit to Brazil in 2007 when Catholic leaders prevented him from even getting close to the pope.
In an extension of the charismatic practices, some Catholic priests now perform "liberation Masses" resembling group exorcisms and welcome congregants who speak in tongues. While such aspects may be frowned upon by some in the Roman Catholic establishment, the charismatic movement has clearly struck a chord among many worshipers.
"Through this movement, many people are finding themselves again inside the church," said Almir Belarmino, 53, a technician at a sewage treatment company who was one of 1,200 people attending a retreat here over the Carnival holiday for people in the charismatic movement.
"Why not dance in the place where the presence of God is so great?" Mr. Belarmino asked. "Joy and excitement are part of the worship we do."
Catholic priests' blending of new practices into their services is nothing new in Brazil. Many people, for instance, say they are Catholic while practicing African-derived religions like Candomblé, which merges the identities of Roman Catholic saints and African deities. "Religious practice in Brazil is often highly hybridized," said Stephen Selka, an expert on African diaspora religions at Indiana University.
At the same time, exceptionally successful evangelical churches in Brazil are wielding more clout. Building on their influential voting bloc in the Brazilian Congress, they are expanding operations elsewhere in Latin America and in Africa and even securing Brazilian diplomatic passports for their top preachers, giving them a similar status here to the Vatican's envoys.
In competition with the charismatic priests, evangelicals are building their own megachurches. In São Paulo, the Universal Church of the Kingdom of God, a multinational Pentecostal organization founded in Brazil in 1977, is spending $200 million to build a 10,000-seat replica of Solomon's Temple.
Evangelical singers also have huge fan bases, like Aline Barros, a Grammy-winning gospel singer with almost a million followers on Twitter. Television preachers like Silas Malafaia, a Pentecostal leader from Rio de Janeiro, have grown prominent after lashing out at supporters of legalized abortion and gay rights.
But while evangelicals have grown more powerful in Brazil, a new shift threatens churches of all stripes: the rise of secularism. Andrew Chesnut, an expert on Latin American religions at Virginia Commonwealth University, said that the fastest-growing segment in Brazil's religious landscape may now be nonbelievers and people unaffiliated with any church, comprising as much as 15 percent of the population.
For a country that as recently as 1980 had negligible levels of people saying they were atheists, this development points to big shifts in society. Compounding the problem for the Vatican, many people in Brazil who say they are Catholic rarely attend Mass, and practicing Catholics often express frustration with the Vatican's policies.
Across Latin America, growing numbers of people say they have no religious affiliation, a phenomenon similar to what has happened in Europe and the United States, but somewhat less pronounced, said Philip Jenkins, a history professor who teaches at the Institute for Studies of Religion at Baylor University. One sign of this, experts say, is the drastic drop in fertility rates, which for the church means fewer children to be baptized and confirmed, fewer young candidates to become priests and nuns, and diminishing ties for Catholic parents to the church.
Brazil's fertility rate, one of Latin America's lowest at about 1.83 children per woman, is below the level needed to keep the population stable.
"If I were a Brazilian cardinal, I would be even more worried about family size and fertility rates, which are a very good augur of secularization, than Pentecostalism," Dr. Jenkins said.
One reveler during Rio's Carnival, Thiago Assis, 30, a systems analyst who is a Catholic, said he was disappointed with Benedict's conservative views and hopeful that his replacement could bring the church closer to him and other Brazilians. "There is a great expectation for the next one to take more liberal positions," Mr. Assis said as he relaxed with a group of friends on the sidewalk amid the blaring music of a street party. He added that he was particularly at odds with the church's stance on condom use, which he called "a health issue."
Taylor Barnes contributed reporting from Rio de Janeiro; Jill Langlois from São Paulo, Brazil; and Laurie Goodstein from New York.
This article originally appeared in The New York Times.