Soaring temperatures have gripped parts of southern and northern India in an extreme heat wave which.
Prosecutor Quawnita Geyer read back a portion of the statement to 35-year-old Andrew Chimboza during cross-examination in his bail application.
He earlier testified that he killed Mbuyiselo Manona, 62, in self-defence at his client's home in Gugulethu last month.
"In your warning statement you say... 'I sit up on him and stabbed him on the chest, tore out his heart and took a knife and then sliced his heart and then I ate his heart' [sic]," Geyer said.
She continued reading: "The reason for me to eat the unknown guy's heart was to show him that I am not a moffie [gay] and after I finished eating the heart, I realised he was dead."
Chimboza, who moved from Zimbabwe to Cape Town in 2009 and runs a window-tinting business, said the investigating officer assaulted him and the statement was fabricated.
However, he confirmed that Manona called him many things in Xhosa, they got into a tussle and he continued stabbing Manona after he got on top of him.
He visited a client's home on the evening of June 10 after she asked him to check up on the windows he tinted for her in 2009.
He earlier testified that Manona headbutted him when he came out the bathroom and he defended himself in a shocked state with a cutlery knife he found on the floor.
He said he repeatedly stabbed Manona to escape the corner he was in.
"All the witnesses that were there confirm you killed the deceased, you cut out his heart and ate it. They say there was flesh in your teeth and dry blood on your mouth," Geyer said.
Chimboza said the blood had come from his own head wound and Manona's spurting wounds.
Geyer asked if he could remember removing the heart with the knife.
"The way I was continuously stabbing, that must have ripped his heart out. Because I was in a shocked state."
Geyer said it was extremely difficult to remove a heart from the ribcage and that Chimboza must have sliced the knife across.
"I was just swinging the knife out of a shocked state so it must have been dragging."
He said he could not confirm that he actually removed the heart.
Geyer said she had received pages of petitions from local residents who did not want him released on bail.
"Do you understand the community want to kill you?"
He replied that God would bless them and that he needed bail to look after his sick partner in hospital and to work.
The bail application continues.