The controversial Archbishop of Warsaw has resigned, less than an hour before he was due to be installed in his post.
Wielgus (l) was moved to tears during the service
Stanislaw Wielgus has been at the centre of a communist-era spying row, and recently admitted collaborating with the secret police.
He announced the decision in person at a special Mass for his installation, to a mixture of applause and shouting.
The Vatican's mission in Poland said in a statement that Pope Benedict XVI had accepted the archbishop's resignation.
The Pope has asked Cardinal Jozef Glemp, Archbishop Wielgus' predecessor, to return to his post temporarily "until further decisions have been taken concerning the archdiocese", the brief statement added.
The BBC's David Willey in Rome says the archbishop was under tremendous pressure to resign, but the decision to step down minutes before his lavish inauguration is unprecedented.
Poland's president was expected to attend the event, which has now been turned into a service in honour of Cardinal Glemp.
Archbishop Wielgus was consecrated in a closed-door ceremony on Friday.
But he publicly admitted his collaboration, and a statement acknowledging he had not been truthful about the matter in the past was read out in churches throughout Poland on Saturday.
He announced his resignation on Sunday morning, following urgent talks between Polish and Vatican officials overnight.
Announcing his decision at the service with tears in his eyes, the archbishop said he had reached the decision after much reflection.
There was an immediate reaction from the congregation with applause, cheers and shouting.
People who had expected to see him inaugurated reacted by saying: "No, you can't do this."
The BBC's Adam Easton in Warsaw says that in a country where the Catholic Church plays such an important role, this scandal could hardly have been more shocking.
The Polish Church has launched a series of investigations in recent years to identify collaborators.
Krakow Archbishop Stanislaw Dziwisz, who heads an investigation in his home diocese, said the communist era had been "a time of persecution of the Church, often bloody and brutal".
The decision to appoint Archbishop Wielgus divided opinion in the staunchly Catholic country.
In one survey, two-thirds of people asked, said Archbishop Wielgus should resign.
His admission came after a Church commission acknowledged he had collaborated with the communist secret police.
Archbishop Wielgus said he had had contacts with security agents, but denied informing on priests.
He said documents suggesting otherwise were drawn up only by communist "functionaries".
Pope Benedict XVI made the appointment last month.
Just before Christmas, the Vatican released a statement insisting the Pope had been fully briefed on Archbishop Wielgus' past and supported his appointment.
The Church plays a very prominent role in Polish society and was highly esteemed because of its leading role in the fight against communism in Poland and worldwide, particularly during the time of Polish Pope John Paul II.
But historians estimate that up to 15% of Polish clergy agreed to inform on their colleagues in the communist era.