A mother accused of starving and murdering her son has told a court he died after being beaten about the head by her partner.
Magdelena Luczak, 27, claimed Mariusz Krezolek, 34, also tried to strangle her as he twice attacked four-year-old Daniel Pelka in his bedroom.
He died in hospital in Coventry on 3 March 2012 from severe head injuries.
The couple both deny murder and causing or allowing the death of a child in the trial at Birmingham Crown Court.
They have admitted a charge of cruelty.
Ms Luczak told the jury Mr Krezolek attacked Daniel when he came home from school on Thursday 1 March 2012.
She said he was angry Daniel had wet himself.
She told the jury Mr Krezolek knocked Daniel to the ground by hitting him on the back of his head and when she tried to intervene he throttled her.
'Asleep not unconscious'
She said: "Mariusz cleaned Daniel in a very unpleasant way. He grabbed him by the T-shirt and dragged him into the box room.
"He hit him again with a hand and he knocked him down to the mattress. I shouted at him not to hit him."
Ms Luczak told the court the next thing she remembered was waking up downstairs on the sofa.
She said she had not called an ambulance immediately because she thought Daniel was "asleep and not unconscious".
"I wasn't aware that he was in such a serious condition - I thought that he was going to wake up," she said.
The court heard the couple eventually called the emergency services at 03:00 GMT on Saturday 3 March.
Ms Luczak admitted lying about events to protect herself and Mr Krezolek.
"I loved him and at the same time I hated him," she said.
"I cannot describe it. Sometimes Mariusz was almost very good for us, and then the days were coming when it was terrible."
Ms Luczak told the court her partner "hated" Daniel and would punish him every day by making him kneel in a corner, do squats or run around.
"Mariusz would check his belly and he would say that there's a slight bump on his belly," she said.
"He would ask Daniel if he was taking any sandwiches [from his school]. Daniel was so scared that he would always confess and say yes he had.
"Mariusz didn't allow me to give him food and he said he was well fed at school."
The court had heard Daniel weighed less than 24lb (10.7kg) when he died.
He took food from classmates and scavenged in bins at his school in the months before his death, the jury heard.
Ms Luczak, who denied force-feeding Daniel with salt, told the court she would give him breakfast and a packed lunch every day.
"On the way to school I would buy him something sweet and after school Daniel wouldn't eat anymore," she said.
Asked by defence barrister Stephen Linehan QC what she did about the punishments given to Daniel by Mr Krezolek, she said: "Daniel didn't listen to me.
"At first I thought it was good that Mariusz was stopping him taking the sandwiches."
When asked how she felt as the punishments continued, she said: "Later, I had enough."
The trial continues.