VATICAN CITY (Reuters) - Baptized as a Roman Catholic and educated by Jesuits, Fidel Castro became a persecutor of the Church after seizing power in Cuba in 1959. Nearly 40 years later, he began a rapprochement that was eventually to enable the Vatican to broker a historic resumption of ties between Cuba and the United States.
Despite the contradictions and about-turns, Castro, who died aged 90 on Friday, believed it was possible to be a kind of Christian while remaining true to the cause of revolutionary socialism.
"If people call me Christian, not from the standpoint of religion but from the standpoint of social vision, I declare that I am a Christian," he said in 2006, shortly before illness forced him to hand over power to his brother Raul.
The change in tone was evidenced on Saturday when Pope Francis, who met Castro in Cuba last year, said that his death was "sad news" and that he was grieving and praying for his repose.
Yet in his early years in power, Castro saw the Church as an enemy. Angered by its denunciation of communism, he nationalized Catholic schools, muzzled Church publications and expelled many priests. About 130 were rounded up on just one night in 1961 and bundled onto a freighter bound for Spain.
Fast-forward to 1991, when the break-up of the Soviet Union deprived Cuba of its main financial backer. Facing economic crisis, Castro began loosening some restrictions on the Church and courting the Vatican as a diplomatic partner. The Communist Party dropped its ban on believers in its ranks.
The breakthrough came in 1998 when Pope John Paul visited Cuba, leading to the lifting of more restrictions and the reinstatement of Christmas as a national holiday. Castro attended nearly every papal event and sat in the front row at Masses.
During that trip, the first by any pontiff, John Paul said "Let Cuba open itself to the world and the world open itself to Cuba" and called for an end to "El Bloqueo", the U.S. trade embargo.
The visit galvanized the local Church, infusing it with more courage to stand up to the communist government on human rights abuses and to press for the release of political prisoners.
After Raul Castro took over, the Church in Cuba supported his efforts to reform the Soviet-style command economy. The 2013 election of the popular Francis, the first Latin American pope, and his defense of social justice, have further warmed relations with the Vatican.
In May 2015, Raul stopped in Rome to thank the pope for brokering the thaw between Havana and Washington and said Francis so impressed him that he might return to the Church, despite being a communist. He has yet to do so, although he did attend papal Masses during Francis' trip to Cuba in September 2016.
Reporting by Philip Pullella; Editing by Mark Trevelyan