A couple who locked a boy in a dirty and cold converted coal bunker have each been jailed for two years.
The 11-year-old boy was forced to live and sleep in the room, described as a cell by social workers, and left with a potty when he was locked up at night.
His mother and her partner, in their 40s and from Blackpool, pleaded guilty to neglect at an earlier hearing.
Sentencing them, Judge Norman Wright said: "This was a flagrant abuse of power and a gross breach of trust."
The rubbish-strewn room had no heating, a bare lightbulb, and concrete walls and floor, with the child left to sleep on a dirty mattress with a sleeping bag for a blanket.
Judge Wright added: "The room has been described as a cell but it seems to me it was akin to a prison cell from a third world country, not the home of an 11- or 12-year-old living in this century in this country."
The couple, who cannot be named for legal reasons, were due to be sentenced last Monday but Judge Wright adjourned the hearing after the man collapsed in the dock.
The boy was put in the room as punishment for raiding the family's fridge, the couple told police after their arrest.
He lived there between the ages of 11 and 12 before his school became concerned as the boy was always hungry in class. Police and social workers visited the house and he was placed in foster care.
Lawyers for the defendants said the boy was "undoubtedly" a very difficult child to manage but the parents were inadequate rather than wicked.
Judge Wright said the physical effects to the boy from living in "truly appalling" conditions may have been remedied but the psychological harm "will be unknown".
"It is bound, in my judgment, to be profound," he said.
He said it had been submitted the child's mother was "subordinate" to her "dominant" partner but the judge ruled that their culpability was equal.
"You were his mother and it seems to me that you were not someone cowed by your co-accused," said Judge Wright.
"You were in a position to stand up (to him) and you did not.
"Your counsel say that you were someone who loved your son very much. If that was so, how can you behave like this?"
Doctors who examined the boy said he was underweight and below average height for his age, and treated him for anaemia.
Since being placed with foster parents he has put on weight and his behaviour has improved dramatically, described in court as a "remarkable achievement for him".
Det Insp Tony Baxter of Lancashire Police said: "This is as serious as it gets, every child has the right to be looked after by its parents and clearly these parents weren't looking after their child properly."