• Tory HQ attacked as demonstration spirals out of control • 35 arrested and 14 injured in violent clashes at Millbank • Police admit being caught out by scale of student action

Tens of thousands of students took to the streets of London in a demonstration that spiralled out of control when a fringe group of protesters hurled missiles at police and occupied the building housing Conservative party headquarters.

Ministers and protesters acknowledged that the demonstration – by far the largest and most dramatic yet in response to the government's austerity measures – was "just the beginning" of public anger over cuts. Police, meanwhile, were criticised for failing to anticipate the scale of the disorder.

An estimated 52,000 people, according to the National Union of Students, marched through central London to display their anger over government plans to increase tuition fees while cutting state funding for university teaching.

A wing of the protest turned violent as around 200 people stormed 30 Millbank, the central London building that is home to Tory HQ, where police wielding batons clashed with a crowd hurling placard sticks, eggs and some bottles. Demonstrators shattered windows and waved anarchist flags from the roof of the building, while masked activists traded punches with police to chants of "Tory scum".

Police conceded that they had failed to anticipate the level of violence from protesters who trashed the lobby of the Millbank building. Missiles including a fire extinguisher were thrown from the roof and clashes saw 14 people – a mix of officers and protesters – taken to hospital and 35 arrests.

Sir Paul Stephenson, Met police commissioner, said the force should have better anticipated the level of violence. He said: "It's not acceptable. It's an embarrassment for London and for us."

While Tory headquarters suffered the brunt of the violence, Liberal Democrat headquarters in nearby Cowley Street were not targeted. "This is not what we pay the Met commissioner to do," one senior Conservative told the Guardian. "It looks like they put heavy security around Lib Dem HQ but completely forgot about our party HQ."

Lady Warsi, the Tory party chair, was in her office when protesters broke in. She initially had no police protection as the protesters made their way up the fire stairs to the roof. Police who eventually made it to Tory HQ decided not to evacuate staff from the building but to concentrate on removing the demonstrators.

The NUS president, Aaron Porter, condemned the actions of "a minority of idiots" but hailed the turnout as the biggest student demonstration in generations. The largely good-natured protest was organised by the NUS and the lecturers' union the UCU, who have attacked coalition plans to raise tuition fees as high as £9,000 while making 40% cuts to university teaching budgets. The higher fees will be introduced for undergraduates starting in 2012, if the proposals are sanctioned by the Commons in a vote due before Christmas.

The NUS president told protesters: "We're in the fight of our lives. We face an unprecedented attack on our future before it has even begun. They're proposing barbaric cuts that would brutalise our colleges and universities."

Inside parliament the deputy prime minister, Nick Clegg – the focus of much anger among protesters for his now abandoned pledge to scrap all tuition fees – came under sustained attack, facing 10 questions on tuition fees during his stand-in performance during prime minister's questions. He said there was consensus across the parties about the need to reform the system.

Labour's deputy leader, Harriet Harman, said the rise in fees was not part of the effort to tackle the deficit but about Clegg "going along with Tory plans to shove the cost of higher education on to students and their families". She said: "We all know what it's like: you are at freshers' week, you meet up with a dodgy bloke and you do things that you regret. Isn't it true he has been led astray by the Tories, isn't that the truth of it?"

Meanwhile one student won an unexpected concession from the coalition. In answer to a question from a Chinese student during his trip to China, David Cameron said: "Raising tuition fees will do two things. It will make sure our universities are well funded and we won't go on increasing so fast the fees for overseas students … We have done the difficult thing. We have put up contributions for British students. Yes, foreign students will still pay a significant amount of money, but we should now be able to keep that growth under control."

Additional reporting by Rachel Williams and Matthew Taylor