For more than seven hours yesterday, police prevented people from leaving the area of the London G20 demonstrations near the Bank of England.

Protesters who had wanted to demonstrate against the British banking system and capitalism in general, but who had also wanted to protest about climate change or the wars in Iraq and Afghanistan elsewhere in the capital, were hemmed in.

Officers forming a wall of fluorescent yellow told those who wanted to leave the area and were puzzled that they could not: "Don't ask us, ask the gaffer."

The area became a public lavatory as people unable to move away used the entrances to Bank underground station as a urinal.

In nearby Bishopsgate, at the Climate Change camp, the same policy of containment was used until later into the night and this morning.

This is a strategy called the "kettle", which sees protesters herded into an area and kept there for hours. Its stated aim is to contain a protest in a small area so it does not spread.

It was justified by the former assistant commissioner (special operations) at the Met, Andy Hayman, in an article in the Times earlier this week.

"Tactics to herd the crowd into a pen ... have been criticised before, yet the police will not want groups spilintering away from the crowd," he wrote.

The containment was backed up at the Bank, first with mounted police and then with police dogs. As people were eventually allowed to leave at about 8pm, they were funnelled out down a narrow exit with a police officer grabbing them by the arm as though they were under arrest, again regardless of age or demeanour.

One officer, asked why people were not allowed to leave under their own steam, replied: "They might fall over."

People were then asked for their name and address and required to have a photograph taken. They are not obliged to do so under the law, but those who refused were put back in the pen.

The aim of the day's protests had been "to participate in a carnival party at the Bank of England, support all events demonstrating against G20 and overthrow capitalism".

The first objective was, to a great degree, achieved. There was street theatre and music, dancing and rolling of joints. The Duke of Wellington, mounted on his horse, was able to fulfill what one imagines was a lifetime's ambition and carry an anarchist flag. There were protesters in police uniforms and blue lipstick wearing "vigilance committee" badges.

The second aim was not possible for many people because they were not allowed to leave to join other protests. The downfall of capitalism may have to wait, although it seems to be doing a perfectly reasonable job of self-destruction.

As for more obvious signs of destruction, the Royal Bank of Scotland had its windows smashed. Why no one had thought to board up a building with the RBS sign on it, as many other outfits had been boarded up, is unclear.

As for the violent clashes that led to cracked heads and limbs, how much was inevitable and how much avoidable? Certainly, the police had to put up with much abuse and missiles, although these were mainly plastic bottles and sprayed beer and cider. Some demonstrators were bent on aggro but, then again, so were some of the officers on Queen Victoria Street.

For hours, demonstrators had been trying to leave – to go home, to pick up their children, to watch the England v Ukraine match on television were some of the reasons given to police as people, some in tears, asked to be allowed to go but were forbidden from doing so. The chants accompanying the last two violent clashes with police, when bottles were thrown, were: "Let us out!"

Nearly eight years ago, on May Day 2001, a similar "kettle" operation was imposed in Oxford Circus for around seven hours. This led to a lengthy civil action, brought against the commissioner of the Met by one of those detained. In January this year, the law lords finally upheld the right of the police in this case to carry out such containment.

The upshot of the ruling and the police's application of their "kettle" formula is that people thinking about embarking on demonstrations in the future may have to decide whether they want to be effectively locked up for eight hours without food or water and, when leaving, to be photographed and identified.