A teenager has won a High Court victory over the Home Secretary's policy of treating 17-year-olds taken into custody as adults - which follows the deaths of two Greater Manchester teenagers who killed themselves after getting into trouble with police.
Two judges ruled that the policy was "incompatible" with human rights law.
Those under 16 are entitled to contact their parents or seek advice and assistance from an independent "appropriate" adult.
The ruling was a victory for HC, a sixth-form college student from south-east London who was arrested by Metropolitan Police but subsequently found to be innocent.
He was detained for more than 12 hours and strip searched at a police station after being suspected of a robbery.
The ruling follows the high profile deaths of two 17-year-olds, Joe Lawton and Edward Thornber, from Greater Manchester, who killed themselves after getting into trouble with police.
Joe's parents, Nick and Jane Lawton, say that their son would "still be here today" if he had received their support when he was taken into custody for drink driving.
The court lifted the anonymity order on HC at the end of their ruling.
He is Hughes Cousins-Chang, from Tulse Hill, south London, now aged 18. His mother is Carrlean Chang. Hughes brought Thursday's landmark challenge with the help of his uncle Christopher Chang.
In his ruling Lord Justice Moses, sitting with Mr Justice Kenneth Parker, said: "I conclude that it is inconsistent with the rights of the claimant and his mother, enshrined in Article 8 (of the European Convention on Human Rights) for the secretary of state to treat 17-year-olds as adults when in detention."
To do so "disregards the definition" of a child in the UN Convention on the Rights of the Child, and the "preponderance of legislation affecting children and justice", said the judge.
Earlier, Mr Lawton told reporters: "If we get the change that we are looking for now, it would have meant that we could have been there to support Joe while he was in the police station and explain to him 'It is not the end - we can get through this, we can help you and make sure that your future is as bright as you expected it' ."
The change in law has received backing from the Association of Chief Police Officers but is still rejected by Policing Minister Damian Green, Mr Lawton said.
Joe, from Stockport, Greater Manchester, was arrested when police stopped him after he decided to drive his new car home from a party.
He was kept overnight at Cheadle Heath police station in Greater Manchester without his parents' knowledge.
Two days later he took his own life, using the shotgun from the family farm.
Ann Thornber, Edward's mother, said her son had been sent a court summons "in error" rather than a final warning for possessing 50p worth of cannabis.
"If we had been told and had been informed we would have been able to support Edward going through that crisis and to reassure him that it was a mistake," she said.
"He was 17 and he was being treated as an adult when in theory he wasn't, he was a 17-year-old."
Lacrosse star Edward, from Didsbury, Greater Manchester, was found hanged on September 15, 2011.
An emotional Mrs Lawton said: "We are obviously very pleased with the ruling. We knew right from the first moment that if we had been there it could have all been very different.
"We are so pleased, but it is also tinged with such sadness and devastation."
Mr Lawton, clutching a large photograph of his son, said: "The judge did say that this law should have been changed in 2010."
He said all of their rights had been "breached".
Mr Lawton stressed: "They need to change this today. They need to get on the telephone right now. There should be someone ringing every police station and telling them that today, 17-year-olds have the right to have an appropriate adult."
Edward's mother Ann Thornber, from Manchester, also holding a photograph of her son, said: "It's just so difficult. Obviously we are delighted that some good has come out of it, but it's not going to bring Joe or Edward back.
"If it can stop another family going through the devastation we have been through, there has to be something positive.
"The tragedy is that Edward and Joe would still be here today if the law had been changed in 2010 but it never happened and now we are suffering the consequences of that."
The boy at the centre of the case, Hughes Cousins-Chang, said outside court: "I am very pleased. It's been a long journey."
His mother, Carrlean, added: "I'm really, really proud of my son."