Relations between Spain's government and its clerics have turned hostile. Socialists swept to power earlier this year with a pro-gay, feminist agenda and the church is putting up a fight.
Spain is a non-denominational country, according to its 1978 constitution, but the state still funds the Roman Catholic Church. More than 90 percent of Spaniards say they are Catholic, but only 25 percent are practicing, surveys show, and few young people go to church.
In September the government, which took power after a surprise election victory in March, plans to start legalizing gay marriage. It also plans to ease access to divorce and abortion.
Church leaders have spent the summer warming up for a fight.
First, Spain's leading bishops issued a statement saying gay marriage was dangerous. Then a priest wrote a piece in a newspaper that so inflamed a gay rights group they are trying to take him to court.
A high profile bishop attacked the government's plans at a mass attended by King Juan Carlos and Prime Minister Jose Luis Rodriguez Zapatero and a colleague blamed the media for trying to "destroy and eliminate Jesus Christ."
The government has asked the church to back off but one cleric retorted that it couldn't sit back and watch the "moral degradation of legislation" and the country's "general apostasy."
LOST INFLUENCE
Nearly 70 percent of Spaniards are in favor of the law to legalize gay marriage while only 12 percent said they were strongly opposed to it, according to a recent poll.
"These measures are absolutely accepted by Spanish society ... It is a much more modern society than the laws suggest," Diego Lopez Garrido, a Socialist party leader in parliament, told Reuters.
But the planned legislation comes as a bit of a shock to the church which for the past eight years of Popular Party (PP) rule knew the government was on side.
The former right-of-center government, which included at least one member of the conservative Catholic group Opus Dei, approved a law that made religious education, or the alternative subject "ethics," count academically as much as mathematics.
Religious education in public schools is Catholic based unless there are at least five students in a school of another religion or denomination who ask for separate classes.
The new government quickly overturned the PP's attempt to make religious education compulsory.
Soon after taking over as prime minister, Zapatero visited the Pope for a 15-minute meeting, only to have it end with a public chiding.
Compare that with former Prime Minister Jose Maria Aznar taking his family to meet the pontiff when he visited Madrid and photographs of a veiled former Foreign Minister Ana Palacio kneeling before John Paul II.
From the late 1930s until 1975 Spain was ruled by Gen. Francisco Franco, a devout Catholic who banned other religions until 1966. Divorce and homosexual activity were illegal during the dictatorship.
AWARE OF LIMITS
While moving swiftly on gay marriage, the Socialists have been more cautious on abortion and church financing.
The government said this month that it would wait until the end of its term to extend justifications for abortion from the current three: in the case of malformation, risks to the mother's health or rape.
Critics saw the delay as surrender to the church but analysts say Spain might not be ready for what was being proposed.
"Spaniards accept abortion in the context of the (current) law. But the proportion (that accepts it for broader reasons) ... doesn't exceed 20 percent," said Juan Diez, head of analysts ASEP.
The government is also going slow on making the church learn to finance itself, although it pledges to protect the state's non-denominational character enshrined in the constitution.
"We can't do it overnight ... what we have to say is listen, you should know that that's the direction we're going in," Lopez Garrido said.
"It doesn't make sense that the state should finance the church ... when the state is non-denominational."
Spaniards choose whether to give money to the church or to charities on their tax returns. In 2002, 23 percent chose to give money to the church while 12 percent asked to give to both.
This year the church will receive 106 million euros ($128 million) directed by taxpayers, and another 33 million from the state, Treasury data shows.
Separately the state funds restoration of cathedrals deemed of national interest, but that is not under threat.
For now, the government seems to be moving in step with the majority of the population, but it must tread carefully, Diez said. "The people approve of these measures ... but if they go much further they might encounter problems.