Armed royal protection officers were guarding the Prince of Wales and Duchess of Cornwall when their car was attacked last night, Scotland Yard chief Sir Paul Stephenson said.
Sir Paul also revealed that the route used by the royal Rolls-Royce had been "thoroughly recced" minutes before the incident.
The Metropolitan Police commissioner said the armed officers showed "enormous restraint" during the attack, in which the royal car was splattered with paint and had a window shattered.
The incident, which happened as the couple were driven through London's West End to a Royal Variety performance, was captured on camera.
Up to 20 demonstrators involved in student fees protests set upon the vehicle with fists, boots and bottles, chanting "Off with their heads!" and "Tory scum".
Sir Paul told BBC Radio 4's Today programme: "Of course it was a hugely regrettable and shocking incident, a dreadful incident really.
"While I don't want to go into the details of our security operations, I do have to say that, as one would expect with such movements, that route was thoroughly recced, including minutes beforehand.
"I think what you have to remember is the unpredictability of those, I was going to call them demonstrators, but these thugs, in the way in which they were moving around London.
"I do think that the officers who were protecting their Royal Highnesses showed very real restraint - some of those officers were armed.
"Their priority was to get that car to the point of safety, which was the venue, and that was achieved, but it was a hugely shocking incident and there will be a full criminal investigation into it."
London mayor Boris Johnson said his office had been in touch with Clarence House "repeatedly" in the last few hours.
"Clearly, I'm very sorry for the experience both of the Prince and the Duchess of Cornwall and there are clearly going to be questions to be asked about how they were on that route," he said.
"But I would like to commend the Prince and the Duchess for carrying on, in spite of the provocation, in spite of the rioting, with continuing with their engagement."
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here