Baby Peter died after months of abuse despite visits from authorities
Baby Peter's mother, her boyfriend and their lodger have been jailed for causing or allowing the boy's death.
The toddler died after enduring months of abuse in Haringey, north London.
Peter's mother and lodger Jason Owens were given indefinite sentences. She must serve at least five years and Owens at least three years.
The boyfriend was given 12 years over Peter's death and life for raping a two-year-old girl. He must serve a minimum of 10 years.
Old Bailey Judge Stephen Kramer said both Baby Peter's mother and Owens would be jailed indefinitely until "deemed no longer to be a risk to the public and in particular to small children".
He described the mother as a "manipulative" and "self-centred" person with "a calculating side as well as a temper".
The judge said she neglected Baby Peter, who was 17 months old at the time of his death, for the sake of her relationship with her boyfriend.
The atmosphere in their home allowed "a complete lack of care", with "a sickening and descending loss of personal responsibility", he said.
'Deceived the authorities'
"I reject the suggestion that you were blind to what was happening in that house or that you were naive," he told Baby Peter's mother.
"Your conduct over the months prevented Peter from being seen by social services. You actively deceived the authorities."
Judge Kramer said the mother's boyfriend played "a major role" in Peter's death.
He said the boyfriend's rape of a two-year-old girl was a "massive breach of trust".
"The seriousness and extraordinary and abhorrent features of this offence call for a sentence outside the normal guidelines," the judge said.
The boyfriend must serve a minimum of 10 years for rape before he can be considered for parole.
The judge told Owens: "You ignored Peter's needs - the needs of a child obviously at risk - preferring instead to shield yourself from discovery."
Baby Peter suffered more than 50 injuries including broken ribs and a broken back.
'Sense of shock'
They occurred despite the fact that Baby Peter was on the at-risk register and receiving 60 visits from social workers, doctors and police over eight months.
Rape of a child under 13 carries a maximum sentence of life in prison
Causing or allowing the death of a child carries a maximum sentence of 14 years in jail, or a fine, or both
However, in cases where offenders are considered to pose a risk to the public, the judge can impose an indeterminate sentence
In passing this sentence, the judge will recommend a minimum term to be served before the offender can be considered for release.
Only after this time can the Parole Board consider whether the offender no longer poses a threat to the public and so is suitable for release
The judge said: "Any decent person who heard the catalogue of medical conditions and non-accidental injuries suffered by Peter cannot fail to have been appalled."
Baby Peter's mother will be eligible for parole in August 2012. Owens will be eligible for parole in August 2011.
The BBC's Angus Crawford, who was in the court, said there was shouting from the public gallery as Peter's mother was led from the dock.
"She was sworn at and called a tramp. Outside the Old Bailey, a group of women wearing T-shirts with a picture of Baby Peter's face on, complained that the sentences were too lenient.
"They shouted, 'The system must be changed'," he said.
Earlier on Friday a serious case review said Baby Peter's death "could and should have been prevented".
Lord Laming, who carried out a wide-ranging review of child protection services after Baby P's death, said the tragedy reinforced his belief that reforms had to be implemented nationwide.
He said: "These are tragic cases, and I share the sense of shock and concern felt by everyone, not least because of the failure of each of the key public services to intervene and protect these young children already identified to be seriously at risk."
Five employees of Haringey Council in north London, including children's services director Sharon Shoesmith, were sacked after Baby Peter's death.
The General Medical Council has suspended two doctors involved in the case.