LONDON -- Church and local government authorities are going to court to evict anti-capitalist protesters camped outside St. Paul's Cathedral -- though officials acknowledged Friday it could take weeks or months to get an order to remove the tent city.

As the iconic church reopened after a weeklong closure triggered by the protest, the City of London Corporation said it was launching legal action on the grounds that the protest is an "unreasonable user of the highway." Scores of tents are pitched on the pedestrianized square in front of the cathedral and near a footpath alongside the building.

"Protest is an essential right in a democracy -- but camping on the highway is not and we believe we will have a strong highways case because an encampment on a busy thoroughfare clearly impacts the rights of others," said Michael Welbank, a member of the corporation's planning and transportation committee.

St. Paul's Cathedral said it agreed that "legal action has regrettably become necessary."

The cathedral's governing body said in a statement that it "takes this step with the greatest reluctance and remains committed to a peaceful solution."

More On This...

Several hundred protesters against economic inequality and corporate greed have been camped outside the building since Oct. 15, inspired by New York's Occupy Wall Street movement. On Oct. 21 cathedral officials shut the building, saying the campsite represented a health and safety hazard.

It was the first time the 300-year-old church, one of London's best-known buildings, had closed since German planes bombed the city during World War II.

After the campers agreed to rearrange their tents the cathedral reopened Friday with a special Eucharist service attended by hundreds of people, including some of the protesters.

"Today we rejoice that we are once again able to worship in an open cathedral," Dean of St. Paul's Graeme Knowles told worshippers.

The protest has divided managers of the cathedral. Some have called for the protesters to leave, but senior clergyman Giles Fraser resigned Thursday, saying he feared moves to evict the camp could end in violence.

Former Archbishop of Canterbury George Carey on Friday criticized the cathedral's handling of the protest, saying the situation had become a "debacle" that could hurt Christianity's image.

"My paramount concern throughout has been that the reputation of Christianity is being damaged by the episode, and, more widely, that the possibility of fruitful and peaceful protest has been brought into disrepute," Carey wrote in the Daily Telegraph newspaper.

Prime Minister David Cameron Friday called for the stalemate to be resolved. He said he supported the right to protest, but this did not include "the freedom to pitch a tent almost anywhere you want to in London."

"I have a feeling that if you or I decided to pitch a tent in the middle of Oxford Street we'd be moved on very quickly," Cameron told reporters at a Commonwealth summit in Perth, Australia.

"It's vitally important places like St. Paul's Cathedral are open to the public."

Getting a court order to evict the protesters could be a lengthy process, complicated by the tangled ownership of this medieval patch of London, which has been the site of a cathedral dedicated to St. Paul for 1,400 years. Christopher Wren's domed landmark was built to replace an earlier building destroyed in the Great Fire of London and became a symbol of the city's endurance after it survived the World War II Blitz.

Conservative legislator Mark Field, who represents the district in Parliament, welcomed the legal action, saying the area in front of the world-famous building had become "like a Third World shantytown."

"I think they are doing the right thing to try and get these people removed, but it's going to be a long process," he told the BBC.