Khyra Ishaq was beaten with a cane and made to stand outside in the cold
A man accused of starving his seven-year-old stepdaughter to death in 2008, told a court he had been brutally abused himself as a child.
Junaid Abuhamza, 30, also said he witnessed his father beating his younger sister to death.
Mr Abuhamza and Angela Gordon, 34, deny murdering Ms Gordon's daughter Khyra Ishaq in Birmingham in 2008.
He said: "In retrospect I see that all the actions that I exhibited in the household were due to my childhood."
Mr Abuhamza told Birmingham Crown Court he had not deliberately set out to starve Khyra, although he had sometimes denied her food as a punishment.
Mr Abuhamza said he had learnt the behaviour from his father.
"If I did not do as he wanted me to I would get no food," he said.
Jurors were shown footage of seven-year-old Khyra Ishaq's home
He denied locking the kitchen during the day so that Khyra and the other children in his care could not get to the food.
Mr Abuhamza admitted five child cruelty charges and told the court he beat Khyra with a cane, made her stand outside in the cold and threw cold water over her.
He said his father regularly used to beat him and also used to stop him breathing with a pillow.
He told the court how in 1984 aged five he had watched his father beat his four-year-old sister Rachel to death for not flushing the toilet.
The defendant said he was about eight or nine years old when his father was released from prison after serving a sentence for manslaughter.
When asked by the prosecution if he blamed himself for Khyra's death, he said: "Yes I do."
The court heard he suffered from bouts of schizophrenia and thought Khyra had a weird face because she was possessed by evil spirits.
Khyra died on 17 May, 2008, after she was discovered at the family home in Handsworth, Birmingham, in a state of starvation.
The case continues.