The Vatican said Stanislaw Wielgus' past actions had "gravely compromised his authority" and he was right to quit. Still, the dramatic move divided believers in the strongly Roman Catholic homeland of the late Pope John Paul II.
The Polish church announced Wielgus' resignation half an hour before a Mass that was to mark the official installation of Wielgus, 67.
Instead, worshippers packed into St. John's Cathedral in the Polish capital saw a despondent-looking Wielgus — dressed in a golden miter and robes — read from a letter to Pope Benedict XVI, offering his resignation "after reflecting deeply and assessing my personal situation."
Wielgus then removed his glasses and sat down on a chair next to the throne that would have been his, had he remained archbishop. His predecessor, Cardinal Jozef Glemp, took the top seat instead.
Revelations that Wielgus cooperated with the secret police of the communist regime, which fell in 1989, have rattled Poland, where many view the church as a moral authority that bravely opposed the regime.
The decision met with applause from some at Sunday's Mass — including President Lech Kaczynski, whose conservative party has sought to purge Poland of the vestiges of communist influence.
But many in the church and among a large crowd gathered outside in the rain protested, shouting "We welcome you," "Stay with us," and "No, No!"
"What he did was stupid, it was a mistake, but it was less harmful than what others did," said Barbara Matusiak, a 60-year-old doctor, outside the church. "We don't know how we would have acted in his shoes, and so we have to forgive."
However, others expressed relief.
"If he was a spy, then he made the right decision to resign," said Teresa Sikorska, 58, who was selling souvenirs on the nearby Royal Castle Square. "How can you go to church and believe a man that spied on people? You can't."
John Paul II is widely credited in Poland with helping end communism.
Glemp, who remains Poland's primate, led the church through the dark days of martial law, shielding opposition activists from authorities.
Wielgus, previously bishop of Plock, was named by the Vatican on Dec. 6 to replace Glemp, who stepped down after more than 25 years as archbishop.
Allegations that Wielgus was involved with the secret police were first raised by a Polish weekly on Dec. 20.
The case expanded into a crisis on Friday when a church historical commission said it had found evidence that Wielgus had cooperated.
However, he stressed that he did not inform on anyone or try to hurt anyone, and he expressed remorse for both his contacts with the secret police and his failure to be forthcoming from the start.
The church said the pope has asked Glemp to administer the archdiocese until a replacement is found.
The Vatican's spokesman, the Rev. Federico Lombardi, said Wielgus' behavior "in past years during the communist regime in Poland gravely compromised his authority."
In a statement to Vatican Radio, Lombardi said Wielgus was right to go "despite his humble and moving request for forgiveness."
"Renouncing of the seat in Warsaw and its prompt acceptance on the part of the Holy Father seemed like an adequate solution to counter the state of confusion that has come about in that country," Lombardi said.
In place of the installation, Glemp devoted Sunday's Mass to a homily defending Wielgus. He called him "God's servant" and warned of the dangers of passing judgment based on incomplete and flawed documents left behind by the communist authorities.
"Today a judgment was passed on Bishop Wielgus," said Glemp.
"But what kind of judgment was it, based on some documents and shreds of paper photocopied three times over? We do not want such judgments," Glemp said.
He said that Wielgus was intimidated and threatened into agreeing to cooperate with the communist police.
Throughout the homily, Wielgus looked down, his mouth twitching and eyes batting shut repeatedly in apparent emotion. It was not immediately clear what role Wielgus might play in future.
Marek Zajac, a commentator for the respected Catholic weekly Tygodnik Powszechny, commended Wielgus for stepping aside, but said the move had taken too long.
"All of the recent perturbations and painful moments for the church — very dramatic and maybe dangerous for the future of the church in Poland — could have been avoided," Zajac said on TVN24.