By Jonathan Head
East Timor has declared a three-day mourning period
In few other countries did the Roman Catholic Church play such a prominent role in the struggle for nationhood as in East Timor.
The government has declared three days of national mourning to mark the death of Pope John Paul II.
His visit to East Timor in 1989 was a catalyst which encouraged those fighting for independence to seek greater international support.
During the 24 years of Indonesian occupation nuns and priests, led by Bishop Carlos Ximenes Belo, risked their lives to try to protect the mainly Roman Catholic population from military abuses.
Bishop Belo's outspoken condemnation of human rights abuses in the territory earned him a shared Nobel Peace Prize in 1996.
But East Timor also presented the Vatican with a difficult diplomatic dilemma.
The church in East Timor was an extraordinary success story for the Vatican
In 1989 East Timor had been hidden from view for 14 years, completely sealed off by an Indonesian occupation which had reportedly cost the lives of one-third of its population.
A planned visit by the Pope that year was controversial.
The Vatican prized its cordial relations with Indonesia, the world's most populous Muslim country, but with a sizable minority of Roman Catholics.
Indonesia would not tolerate any suggestion that its rule in East Timor was not legitimate.
It insisted Pope John Paul II hold mass in a natural arena under the mountains outside Dili where a number of atrocities were thought to have taken place.
But the evidence of extensive human rights abuses, and the anguished protests of Bishop Belo, demanded some show of solidarity from the Pope.
He managed the balance with characteristically judicious symbolism.
Catholic Bishop Carlos Belo fought against human rights abuses
On arriving in Dili he kissed a cross, with which he then touched the ground, rather than kissing the ground itself as was his custom, to avoid suggesting East Timor was a sovereign country.
He spoke out strongly against all abuses, without specifying his Indonesian hosts, but making it clear enough to the tens of thousands who had come to hear him whom he had in mind.
In front of the world's cameras for the first time, young Timorese scuffled and then fought with the Indonesian security forces, the outside world's first view of a civil disobedience movement which would continue until the referendum which eventually won East Timor its independence in 1999.
At key moments the Vatican backed its priests and bishops, while always professing neutrality on the issue of independence.
Bishop Belo was in many ways like the Pope: politically and morally conservative, but outraged by the cruelty and repression he witnessed.
His outbursts got him into trouble with the Indonesian government, which put pressure on the Vatican to replace him.
The Vatican refused. I can vividly remember the extraordinary day in 1996 when the Indonesian ruler Suharto made his first visit to East Timor in eight years.
He had to meet Bishop Belo, who through unlucky timing for Indonesia had just been awarded the Nobel Peace Prize.
The two shared a brief helicopter ride over Dili, after which Bishop Belo, as was his habit, shunned the small group of journalists who had been allowed in for the visit.
Many Timorese have been left stunned by the Pope's death
But the Vatican Ambassador to Jakarta ushered him out to meet us, and stood smiling behind him, as Bishop Belo said how strange it was that he was the first Indonesian citizen to win the Nobel Prize.
Yet the president had not even mentioned it, let alone congratulated him.
The church in East Timor was after all an extraordinary success story for the Vatican - at the time of the Indonesian invasion only 20% of its people called themselves Roman Catholics, a faith they associated with Portuguese colonial rule.
Ten years later that figure had risen to 95%.
With nowhere else to turn to, people sought refuge in the church.
Some of the clergy directly helped the armed resistance movement in the mountains.
Pope John Paul II would have been uncomfortable with this overtly political role, but he did nothing to stop it.
A number of priests and nuns paid with their lives when pro-Indonesian militias rampaged through East Timor after the referendum, but as a result the standing of the church at independence had never been higher.
Ironically now that the struggle is over, church attendance is dwindling, as younger Timorese lose interest and the church's protective role is no longer needed.