A man who admits strangling a 16-year-old girl to death said he wanted revenge on her mother.
Wenjing Lin died at her family’s Chinese takeaway in Ynyswen, Rhondda Cynon Taf, on 5 March.
Chun Xu, 32, denies murder but pleaded guilty to manslaughter.
When questioned by a psychologist, Merthyr Tydfil Crown Court heard Mr Xu replied: “I didn’t mean to hurt the little girl. I wanted revenge on her mother.”
He added: “She upset me on many times and didn’t listen to what I say.”
Mr Xu also denies attempting to murder Wenjing’s stepfather Yongquan Jiang at the Blue Sky Chinese takeaway, near Treorchy.
He admitted attacking 38-year-old Mr Jiang with two knives, but denied intending to kill him or cause him serious harm.
Prosecutor Michael Jones QC told the court Mr Xu had cut his own throat after the attack.
The jury heard an hour before Wenjing was killed, Mr Xu had used a search engine to ask “can fingerprints be destroyed by fire?”
The court was also shown body-worn camera footage of emergency services arriving at the scene, which included firearms officers moving around the building and the defendant receiving treatment for his self-inflicted injuries.
Mr Xu was a heavy gambler and owed Wenjing’s family about £14,000, the court heard.
Although they were not blood relations, he was described as being seen as like a nephew to Wenjing’s mother, Meifang Xu, but there had been disagreements between their families.
In December 2020, the family entrusted Mr Xu with £20,000 that he said he would send back to China for them to pay a friend who had loaned them money to start their business in the UK.
However, Mr Xu only sent some of the money back and gambled away £14,000, which he had then begun paying back.
On 4 March, the jury heard Mr Xu travelled from the Pontypridd area where he was living and working in a different Chinese restaurant.
He brought with him one of the knives used to attack Mr Jiang.
The court heard he had asked for no-one to be told about his visit, during which he ate with the family and stayed the night.
The following morning, Wenjing was getting ready for school and messaging friends on Snapchat.
Mr Jones told the court she sent her last message just before 09: 30 and did not respond to messages after that because “she had by now been killed by the defendant”.
Later, at about 11: 00, Mr Jiang heard someone pacing around downstairs and found Mr Xu who invited him into the basement for a cigarette and to get some fish from the freezer, the court heard.
As Mr Jiang opened the freezer, the jury heard Mr Xu attacked him with two knives, stabbing him in the neck and body.
During the struggle, Mr Jiang asked Mr Xu why he was attacking him, to which he replied: “Money, money, money”.
Ms Xu then came down the basement stairs and saw the two fighting. She tried to ring a friend, and Mr Xu bit her.
Mr Jiang managed to get back onto the ground floor where he found his stepdaughter lifeless on a black mat by the takeaway counter.
Despite attempts made by the emergency services, she could not be revived.
The jury was told that the defendant was found in the kitchen with a self-inflicted injury to his throat, which was later treated at University Hospital of Wales.
Mr Jones described how £900 was found in Mr Xu’s pockets, as well as Wenjing’s mobile phone and keys.
When he was interviewed by police, he gave no explanation for his actions.
Mr Jones told the jury: “We do not accept he had no intention to kill or cause serious harm”.
A statement from Rhiannon Davies, the deputy headmistress at Treorchy Comprehensive school, where Wenjing was a pupil, said she was an “exceptional student”.
Ms Davies said that on the day of her death, Wenjing had logged on for a Maths lesson, adding she would be “sorely missed”.