A Carpetright store burns on Tottenham High Road during the riots. Photograph: Matthew Lloyd/Getty Images

The most striking aspect of the data released by the Ministry of Justice on the justice system's response to the riots concerns juveniles. In the last 11 months, more than 700 children aged 10-17 have faced court for their part in the disorder. Of these, 218 were given custodial sentences averaging eight months. In mid-June, according to Ministry of Justice figures, 34 children were still being held on remand awaiting trial.

Judges took a similarly tough approach to adults, with sentences that were typically more than four times longer for offences related to the riots than for similar offences the previous year – 16.8 months on average, compared with 3.7 months.

Those convicted of riot-related offences in the youth courts, where most cases involving children are heard, were six times more likely to be given custody than those convicted by the same court for similar offences in 2010. One youth court magistrate interviewed for Reading the Riots claimed the usual "sentencing rulebook" for children with no previous convictions had been "torn up and thrown away".

Many defence lawyers said they were shocked watching children who had never been in trouble before being sentenced to custody, something that would normally happen only if they had been convicted of a serious crime.

Most agreed that offences committed during the riots should attract harsher punishment than would otherwise be the case, but many said all sense of proportion was lost. Sentencing went "absolutely stark staring mad", said a 59-year old solicitor. Another accused judges of a knee-jerk reaction.

Prosecutors were fairly robust in their defence of custodial and deterrent sentences, though occasionally admitting to the febrile atmosphere in which such sentencing took place, and occasionally talked in more sympathetic tones about the large number of first-time offenders.

Courts failed to distinguish between ringleaders and followers, according to a Birmingham solicitor with more than 20 years' experience. "A younger sibling tagging along [who was] given a bottle of pop by an older sibling who had been into a shop … was treated as seriously as any other riot-type case," he said. "And that's the problem. The starting point for someone with no previous convictions, even if they were under 18, was custody."

But some Crown Prosecution Service lawyers said they would not have opposed bail for some juveniles, nor would they have appealed against non-custodial sentences. Several defence lawyers expressed alarm that "nice kids" who had foolishly got swept up in the disorder were being sent to young offender institutions (YOIs) to rub shoulders with far more hardened criminals. "Good people are going to come out bad. People are going to come out of [Feltham YOI] a lot angrier than they went in," said one lawyer.

"For people who are not used to being around bad boys, it was awful, really awful," said another. "They didn't take it well. You know, people who would have been deemed vulnerable."

One lawyer described pleading with the court not to impose a custodial sentence on a slightly built 18-year-old who had stolen electrical items from outside a shop. The young man was in remission from cancer and had tried to slit his wrists while on remand. Despite the probation officer arguing for a suspended sentence, he was sent to a YOI for several months.

"He was a really vulnerable person to have gone to prison. You know, some of the lads in prison can be quite tough. I think he was bullied in prison and you know what boys are like, they don't want to admit it, but that wasn't a good place for him to be."

But even those prosecutors who said they were initially surprised at the length of sentences people were getting believed the harsher punishments were justified, given the exceptional circumstances. Many cited last October's court of appeal judgment, which upheld the approach many courts were taking.

A prosecutor in Manchester said: "If you are part of a disorder where you are causing fear, where law-abiding citizens can't even come into the city centre, where law-abiding citizens are leaving their offices early because they are frightened … In that context, the sentencing needs to reflect not just your culpability, but your culpability as part of the wider culpability. So the sentences in my view were absolutely appropriate."