The Archbishop of Warsaw resigned less than an hour before a mass marking his installation, after revelations that he co-operated with Communist-era secret police plunged Poland's Roman Catholic Church into crisis.
Stanislaw Wielgus appeared to fight back the tears as he made his announcement in St John's Cathedral in Warsaw. It ended a scandal that has divided the country, embarrassed the Vatican and dealt a blow to Poland's highly influential church.
Earlier he had denied he was a spy but admitted he had agreed to communicate with the secret police because he feared refusal to do so would have threatened his studies. The actions had, he conceded, failed to show "decent prudence, courage and determination".
The dispute has reopened wounds from the years of struggle against Poland's Communist regime. While the Catholic Church was a source of support for the Solidarity democracy campaigners, some historians estimate that about one in 10 members of the clergy collaborated with the government of the time.
Yesterday Archbishop Wielgus, 67, bowed to growing anger among the public and stood down minutes before the ceremony Shaking visibly, he said: "I place my resignation from the post of Metropolitan Archbishop of Warsaw in Your Holiness's hands." While the announcement was greeted by applause, some among the congregation shouted "no" and "stay with us".
Pope Benedict XVI accepted the resignation, according to a statement half an hour earlier from the Vatican's mission in Poland. The Vatican has asked Cardinal Jozef Glemp, Archbishop Wielgus's predecessor, to return to his post temporarily.
Yesterday's ceremony, attended by the Polish President, Lech Kaczynski, became a service in honour of Cardinal Glemp who defended the outgoing Archbishop. He said: "Today, a trial of Archbishop Wielgus took place. What kind of trial was it? Based on bits of papers, copies of copies of some documents. We don't want such trials."
Nevertheless the unprecedented departure seems to have been forced by pressure from the public and politicians. More than half of the 1,024 people questioned in a survey for the broadcaster TVN said they were against the nomination after learning about the collaboration with the secret service.
Moreover the scandal has coincided with a renewed push by the right-wing government led by the Law and Justice Party to purge from public office those deemed to have co-operated with the Communist authorities. Mr Kaczynski applauded after the Archbishop announced his resignation. The President hascalled for those who co-operated with the Communists to be on rooted out of national life.
Andrzej Paczkowski, a historian who was asked by Poland's human rights ombudsman to investigate allegations that Archbishop Wielgus was a spy, said last week there was evidence that he had such a role in the 1970s. Poland's Catholic Church Historical Commission said he had co-operated with the secret services before the collapse of Communism.
In a statement last month the Vatican said it took into account "all of the circumstances" of the Archbishop's life "including those regarding his past" when it appointed him.
The Pope made no comment on the resignation when addressing Polish pilgrims at St Peter's Square in Vatican City.
A spokesman for the Polish episcopate said the legal basis for the resignation was part of church law requiring a bishop to stand down if he is "unable to properly exercise his office [and therefore] is strongly requested to submit his resignation".