Delays in treating a severely disabled boy thought to have had toothache for five months were "little short of an outrage", a judge has said.
The autistic boy, who cannot be named for legal reasons, could not say he had toothache and started banging his head against walls due to the pain.
Mr Justice Hayden said the handling of the boy's case by Cardiff and Vale health board was "indefensible".
The health board apologised and said it would launch an internal inquiry.
The hearing took place on Friday at the Court of Protection in London, where issues relating to people who may lack the mental capacity to make decisions are considered.
Mr Justice Hayden said the teenage boy's head banging had started in October. His parents, one of whom is a mental health nurse, thought his behaviour was a response to toothache.
In November they had taken him to an accident and emergency department because thought he had concussion.
But health authority bosses had not asked a Court of Protection judge to decide what treatment was in the boy's best interests until this week.
He said treatment was now planned but could not take place until early March.
Mr Justice Hayden, who is based in the Family Division of the High Court, said anyone who had suffered toothache would think waiting from now until early March for treatment was an "eternity".
The judge suggested that the head banging could have caused a severe injury and led to the boy's death.
He said the situation was "lamentable".