The dean of St Paul's Cathedral in London has resigned, saying his position had become untenable.
The Rt Rev Graeme Knowles said the past fortnight had been a testing time.
It follows weeks of protests outside the cathedral by anti-capitalist protesters, which led to the building being closed for several days.
The news comes as the City of London authorities prepare to order protesters outside St Paul's to remove their tents and equipment within 48 hours.
The City of London Corporation said it was going to issue a legal notice on Tuesday to try to clear the protest camp.
It has insisted that the protesters themselves are not being asked to leave the area.
A spokesperson said if the protesters did not comply the case would go to court.
Dean Knowles, who had occupied the most senior decision-making position at the cathedral, said he was stepping down "with great sadness".
In a statement, he said: "It has become increasingly clear to me that, as criticism of the cathedral has mounted in the press, media and in public opinion, my position as dean of St Paul's was becoming untenable.
"In order to give the opportunity for a fresh approach to the complex and vital questions facing St Paul's, I have thought it best to stand down as dean, to allow new leadership to be exercised."
It follows last week's resignation of Dr Giles Fraser, who had been sympathetic to the activists.
The Archbishop of Canterbury, Dr Rowan Williams, said he was sad to hear the news of Dean Knowles' resignation.
"The events of the last couple of weeks have shown very clearly how decisions made in good faith by good people under unusual pressure can have utterly unforeseen and unwelcome consequences, and the clergy of St Paul's deserve our understanding in these circumstances," he said.
He added that the wider issues raised by the protesters "remain very much on the table".
Dr Richard Chartres, the Bishop of London, said he was sad to hear the dean's decision, adding that he had "acted honourably in a very difficult situation".
In a statement responding to the resignation, Occupy London described the management of St Paul's Cathedral as "deeply divided" over its response to the protests.
"But our cause has never been directed at the staff of the cathedral," the statement added.
The statement went on to urge an "open and transparent dialogue" involving all parties.
Lucy, an Occupy London protester, said no-one was pleased by the resignation.
"I don't feel that I caused the resignation, that was the dean's decision," she said.
"What we want to do is to work in the spirit of co-operation and in unity with the church... This is a historic opportunity for the church to throw itself behind this protest and say we need change."
Last week the corporation's Planning and Transportation Committee voted to go ahead with proceedings to remove the encampment on the grounds that it constituted an unreasonable use of the highway.
Ronan McNern, a supporter of the Occupy London Stock Exchange protest, said it would be up to the general assembly of the protesters as to how they responded to the legal notice.
He said: "Every time that the occupiers have been challenged, they have remained calm. We have a just cause and there is absolutely no reason why we would be intimidated. We trust in the people."
Met Commissioner Bernard Hogan-Howe told BBC London's Eddie Nestor that the law is "not very clear cut" but he insisted that people did not have the right to commit crime.