Pope Benedict XVI spent this weekend in Spain trying to reclaim one of the most important Roman Catholic strongholds.

During his visit, he surprised Spain with strong words against what he described as “aggressive secularism” on the part of the government that since 2004 has legalized gay marriage, relaxed abortion legislation, and eliminated compulsory religious education in schools.

“The renaissance of modern Catholicism comes mostly thanks to Spain. But it is also true that laicism, a strong and aggressive secularism was born in Spain, as we saw in the 1930s,” the Pope said on board his plane just before arriving in the northwestern coastal city of Santiago de Compostela. “This dispute is happening again in Spain today. The future of faith and the relations between faith and secularism have Spanish culture as its epicenter.”

IN PICTURES: Pope Benedict XVI

While officially consecrating Barcelona's Sagrada Familia church as a basilica on Sunday, the pope continued his push.

“The Church opposes all forms that negate human life and supports everything that supports the natural order in the realm of institution of the family,” he told the 6,500 people inside, almost a fifth of them from the clergy.

But the low turnout to see Benedict XVI on his second visit to Spain as pope seemed to illustrate his concern that Europe is shedding its Catholic roots.

Crowds of in the tens of thousands sometimes seemed to only slightly outnumber the vast security detail that closed off much of Spain’s second-biggest city, and many streets along the papal route were nearly empty. Also, small, unusual protests such as a gay "kiss-in" by couples as Benedict XVI waved from his vehicle drew the ire of loyal Catholic followers.

Zapatero's scheduling conflicts

King Juan Carlos and Queen Sofia greeted the pope, were present in the consecration mass, and bid him farewell at the airport, but Socialist Prime Minister José Luis Rodríguez Zapatero was conspicuously absent and only met the Catholic patriarch for a private meeting in the airport minutes before he returned to Rome.

Mr. Zapatero decided to visit Spanish troops in Afghanistan throughout most of the pope’s visit and publicly only shook his hand, highlighting the tense relations with one of the Vatican’s closest traditional allies in Europe.

The fallout in relations between the current government and the Vatican, however, is not seen as a real challenge from the state. That would probably not be tolerated by a majority of Spaniards, analysts say.

Recent surveys show the number of practicing Catholics is dropping fast, to around 20 percent currently, mirroring a broader European trend, but the vast majority of Spaniards still declare themselves Catholics. And the Catholic Church has great perks here, starting with around $9 billion annually in different forms of direct and indirect government funds from tax revenue to financing of religious schools. The Spanish Church is the second biggest property owner in the country, trailing only the government.

Church defends its political perks

“Spain is a bastion of the Catholic Church in Europe. It doesn’t treat all religions equally. It has preferential treatment for the Church,” says Ferran Requejo, a political science professor in the Universidad de Barcelona. “Relations with the government have been cold for some time and the Vatican has been pushing to weaken the secular push.”

The Vatican has also been aiming to derail a government electoral promise to reform “religious freedom” legislation that is now broadly considered discriminatory against other faiths.

It has been indefinitely postponed, though, to avoid further alienating Catholics as the government is already facing massive discontent over the economic crisis.

Spain is not officially secular, as most western states are. Rather, it is legally neutral in terms of religion, implying it is a faith-based state. In practice that has translated into huge benefits for the Catholic Church that leaders from other religions, namely Muslims, Protestants, and Jews, say are unconstitutional because they are discriminated against when getting access to government aid and public space.

In Santiago, Benedict XVI met the leader of the main opposition Popular Party, Mariano Rajoy, who has promised to turn back secular laws passed by the Zapatero government if elected.

IN PICTURES: Pope Benedict XVI