Young offenders will have their backgrounds examined in greater detail under a new sentencing regime which will take into account whether they have suffered trauma.

The latest guidelines set out how courts should consider mitigating circumstances which may indicate an “unstable upbringing” when determining punishments for children and teenagers aged between 10 and 17.

They emphasise the need to avoid criminalising under-18s unnecessarily, with custodial sentences seen as a “last resort”.

Offending by a child or young person is “often a phase” which “passes fairly rapidly”, the guidance published by the Sentencing Council says.

It highlights factors regularly present in the background of youngsters who come before courts, such as deprived homes and poor parental employment records.

Possible mitigating factors include exposure to drug or alcohol abuse, criminal behaviour within the family and experiences of trauma or loss.

Although “mitigating factors” are considered by judges in all criminal cases currently, the new guidelines will apply specifically to young offenders.

The number of young offenders being sent to prison has been declining steadily over the past decade, according to official figures, and in January 2015, the number of children in youth custody in England and Wales fell below 1,000 to 981 for the first time on record. It fell further to less than 900 last year.

The charity Beyond Youth Custody says that many young offenders who end up in custody have had “complicated and chaotic lives”.

Repeat offenders are statistically very likely to have experienced trauma, abuse, bereavement, grown up in care, been excluded from school, have experienced drug or alcohol dependencies and have mental health problems or personality disorders, according to the charity.

One of the most striking statistics is that while less than one per cent of all children in England are in care, looked-after children make up 33 per cent of boys and 66 per cent of girls in youth custody.

According to the charity Young Minds, 95 per cent of imprisoned young people have a diagnosable mental health condition.

The new guidelines could prove controversial as surveys consistently show the majority of the British public believes the criminal justice system is “too soft” on criminals – including young offenders.

In the year ending March 2015, young offenders were responsible for around 10 per cent of all recorded offences, according to government statistics.

In spite of public perception of rising crime rates among young people, statistics suggest the opposite is true with the number of arrests of young people falling by 13 per cent between March 2014 and March 2015.

The UK takes a tougher approach to youth justice than some countries. While the age of criminal responsibility in the UK is 10, in Finland it is 15 and in Belgium and Luxembourg it is 18. Scotland does not prosecute offenders below the age of 12. England and Wales have a high rate of youth custody and in 2011, of all the countries in Europe, only Turkey locked up more young offenders than the UK.

Around one third of the UK’s young offenders return to crime after being released from custody, according to statistics from the Ministry of Justice.