LONDON — Britain’s coalition government survived the most serious challenge yet to its austerity plans on Thursday when Parliament narrowly approved a sharp increase in college fees. But violent student protests in central London, including an attack on a car carrying Prince Charles and his wife, Camilla, to the theater, provided a stark measure of growing public resistance.

The 62-year-old heir to the British throne and his 63-year-old wife, the Duchess of Cornwall, were said by palace officials to have been unharmed in the episode. The confrontation occurred when a group of about 50 protesters, some in full-face balaclavas, broke through a cordon of motorcycle police flanking the car as it approached London’s theater district in slow-speed traffic. Some of the demonstrators shouted “off with their heads!” and others “Tory scum!”

A photograph of the couple, in formal evening dress, showed them registering shock as protesters beat on the side of their armored, chauffeur-driven Rolls-Royce with sticks and bottles, smashing a side window, denting a rear panel and splashing the car with white paint. A Jaguar tailing the car and carrying a palace security detail was so battered that the police ended up using its doors as shields.

Prime Minister David Cameron called the attack on the royal couple’s car “shocking and regrettable.”