The G20 protests in central London turned violent today ahead of tomorrow's summit, with a band of demonstrators close to the Bank of England storming a Royal Bank of Scotland branch, and baton-wielding police charging a sit-down protest by students.

Much of the protesting, from an estimated 4,000 people in the financial centre of the capital, was peaceful, but some bloody skirmishes broke out as police tried to keep thousands of people in containment pens surrounding the Bank of England on Threadneedle Street.

A minority of demonstrators seemed determined to cause damage, seeking confrontation as they surged towards police lines. Late tonight, much of the City remained cordoned off.

By about 8pm, running battles between riot police and demonstrators were taking place across London Bridge. Bottles, sticks and bricks were thrown.

Nearer the heart of the City, police moved in to break up a 'climate camp' on Bishopsgate, with baton-wielding officers said to be pushing through a line of tents and bicycles. At least five armoured police vehicles were also at the scene.

The trouble broke out as Gordon Brown and Barack Obama announced that the G20 leaders were "within a few hours" of agreeing a global deal for economic recovery. The G20 summit will be held tomorrow, amid high security, in London's Docklands.

Earlier in the day,protesters targeting the Bank of England were met by lines of police whose tactics were to try to pen demonstrators inside multiple cordons of officers. "It's our street, it's our street," the protesters chanted as they were forced forward on to the line.

At one stage, after midday, riot officers and police dogs and horses removed some 20 protesters who had spent a quarter of an hour ransacking an RBS branch, tearing out computers and telephones. To cheers and shouts, they smashed several of the bank's windows, writing "burn a banker" and "scum" in spray paint. Police in riot gear inside the bank tackled protesters trying to climb in through the smashed windows.

Subsequently, at least 10 protesters sitting down in the street close to the Bank of England were left with bloody head wounds after being charged by officers with batons at around 4.30pm. One woman, said to be an Italian student, was carried off unconscious.

Tonight the Metropolitan police said 32 people had been arrested. The offences ranged from threatening behaviour and criminal damage to violent disorder; two were arrested for aggravated burglary on the RBS building and one for attempted arson on the branch. One was detained in possession of a class-A drug, while another 12 protesters who had turned up at the protest in a blue armoured personnel carrier were arrested in connection with possession of police uniforms and road traffic offences.

Some buildings in the City were boarded up in anticipation of trouble, with staff warned to work from home or dress down. As protesters began to gather, after 11am, some City workers were seen waving £10 notes at them from office windows.

After the charge against the sit-down protest at students, there were complaints that officers had been heavy handed. "When people surrounded RBS, I could understand police tactics," said Jack Bright, 19. "We were sat down, trying to have a peaceful protest, but they started whacking us."

With his head wounds bandaged up by an ITN crew, Finn O'Sullivan, 21, said: "There was a girl in front of me who got hit. Then a bloke got hit and fell to the floor. I was next in line and just remember shields coming down on us. The police were stamping and kicking. I asked them to let me through the line for medical treatment but they said no."

Earlier police spent an hour clearing and sealing off the branch of RBS that had been targeted. The firm is at the centre of a row over £703,000-a-year pension payments to Sir Fred Goodwin, the disgraced former chief executive – and the branch had been closed today as a precaution.

By midday, around 60 protesters and police were involved in scuffles, which saw officers pelted with bottles, eggs, fruit and paint. Some officers also had their helmets ripped from their heads and thrown into the air, which turned pink and red as protesters let off smoke bombs. Police responded by using truncheons, batons and pepper spray.

Protesters pushing against the police on Threadneedle Street provoked intermittent skirmishes that left several officers and demonstrators injured. Police used truncheons and batons to beat back the protesters each time they surged forward. Some in the pens demanded to be released, saying they were being denied the right to march.

Scotland Yard said corralling the demonstrators into the area was a legitimate tactic as missiles were being thrown at police officers on Threadneedle Street. A spokesman said that the pens would remain in place for as long as necessary, but by 3pm police had loosened the cordon around the Bank and allowed crowds to filter away along Queen Victoria Street.

Injured demonstrators with bleeding heads and necks were ushered through the crowd while others handed out milk so that people could wash the pepper spray from their eyes and mouths.

Harry, dressed as the Grim Reaper, led the procession from Moorgate to the Bank of England. His costume did not amuse the police, however, who demanded that he remove his skull mask so they could see his face.

He said it was the first time he had marched in 10 years. "I'm protesting for the small individuals in Britain who have been left with their pants down as the government bails out the banks for billions of dollars. Where's the money for the struggling baker, butcher, small marketing people and architectural companies?"

But by late afternoon tempers around the main protest zone were fraying, as demonstartors complained they were being blocked in by police and not being allowed to leave.

Then, at around 7pm, the police moved in on the climate camp. Rebecca Pearse, of the Legal Observer Collective, who said they worked with police to provide a witness of events, said that until the police moved in "it had been all sunshine, smiles, cake , food and drums. Then it just escalated."