More than 22 years after the fall of Communism, the Czech government agreed this week to pay billions of dollars in compensation for property seized by the former totalitarian regime.
The deal threatened to topple the current coalition government earlier this week after a junior partner voiced anger at the thought of huge sums being paid to churches in the middle of the European debt crisis.
But even in a country where indifference to religion is strong, the compensation plan — to be spread over 30 years — proved to be a win-win situation.
The government will no longer have to pay the priests' salaries and religious groups will finally get some compensation after several previous attempts had failed.
Under the plan, the country's 17 churches, including Roman Catholic and Protestant, would get 56 percent of their former property now held by the state — estimated at 75 billion koruna ($3.7 billion).
They would also get 59 billion koruna ($2.9 billion) in financial compensation paid to them over the next 30 years, and the state will gradually stop covering their expenses over the next 17 years.
Wednesday's ruling still needs the approval of Parliament, but the governing three-party coalition has a comfortable majority.
In 2008, a similar bill was approved by the government but Parliament rejected it.
Culture Minister Alena Hanakova, whose ministry drafted the bill, called the decision "historic" and the Catholic Czech Bishops' Conference welcomed the move, saying it hoped Parliament will follow suit.
The Catholic Church will receive the biggest share of the restitution money.
It all harks back to 1948, when the Communists seized power in the small central European nation then named Czechoslovakia.
The Communists confiscated all the property owned by churches and persecuted many priests. Churches were allowed to function only under the state's strict control and supervision and priests' salaries were paid by the state.
At least 65 Catholic priests, monks and nuns were executed or killed in prisons while others were driven to suicide by the harsh conditions, according to Stanislava Vodickova of the Institute for the Study of Totalitarian Regimes.
"The Communists launched a brutal campaign of terror against the churches immediately after they got to power," Vodickova said.
One of the Czech victims was Josef Toufar, a Catholic priest tortured to death by investigators in 1950 after the secret police claimed he staged a fake miracle in his church in Cihost where a cross began to move for no obvious reason during Mass.
It is still unknown what caused the cross to move.
After the 1989 Velvet Revolution brought in democracy, some churches and monasteries were returned, but the churches have since sought to get back other assets such as farms, woodlands and buildings.
Czechoslovakia then split into Slovakia and the Czech Republic in 1993.
The government's decision Wednesday came after its junior coalition party withdrew its objection to the plan.
Prime Minister Petr Necas had threatened to dismiss the Public Affairs party's ministers if they blocked the proposal, which would have ended the three-party coalition that came to power after the 2010 election.
"It's crucial that we've managed to agree on it," Necas said.
Public Affairs chairman Radek John said his party only agreed after it received guarantees that the government would not use austerity measures to raise funds for the compensation.
"Common citizens won't be affected," John said.
The party's opposition reflected the overall atmosphere in the country, considered one of the most atheist in Europe, a legacy of a former Soviet plan to create one of the most atheist states in its orbit.
According to a December 2011 poll, 69 percent of Czechs were against the religious restitution and only 40 percent considered churches to be useful.
Many religious groups were persecuted across eastern Europe under communist regimes.
In neighboring Hungary, more than 6,500 church-run schools were taken over by the state during communist times.
Religious orders were closed down and hundreds of priests were jailed, deported or sent to internal exile.
Several were executed, usually accused of plotting against state interests.
Even in the Roman Catholic stronghold of Poland — which gave the church Cardinal Karol Wojtyla, who in 1978 became Pope John Paul II, the first non-Italian pope in over 400 years — Communist authorities seized church land and did not allow new churches to be built.
In one of the worst events, Polish secret security abducted and murdered a pro-Solidarity movement priest, the Rev. Jerzy Popieluszko, in 1984.
The four perpetrators and their immediate superior got prison terms of up to 25 years but have since been released.
In the Soviet Union, many churches were turned into stables, workshops or, in the case of the Solovetsky monastery complex, into a prison camp widely considered to be the "Mother of the Gulag."
Kazan Cathedral in St. Petersburg, modeled after St. Peter's Basilica in Rome, was in Soviet times turned into the Marxist-flavored Museum of Religion and Atheism, and Moscow's Cathedral of Christ the Saviour was infamously blown up under Josef Stalin's regime.