A newborn baby was illegally snatched from its mother by social workers in the early hours of yesterday morning.
Officials claimed the 18-year-old mother was unfit to care for the child because of mental health problems.
But hours later a High Court judge ordered the infant to be returned immediately, saying the social workers had acted beyond their powers.
Mr Justice Munby told the officials that they "should have known better".
The troubling case follows complaints from parents that social workers have taken their children for adoption without good reason, and suggestions that families are being broken up to meet bureaucratic targets.
Last night campaigners welcomed the ruling and praised the mother's lawyers for their prompt action to reunite the baby with its mother.
The child, who cannot be identified for legal reasons, was born healthy at 2am yesterday.
Later Ian Wise, appearing for the mother, referred to as "G", told the High Court in London that the child was taken from her at about 4am without her consent.
The child was removed after staff at the hospital were shown a "birth plan" prepared by local authority social services.
The plan said the mother, who had a troubled childhood and suffers from mental health problems, was to be separated from the child, and no contact allowed without supervision by social workers...