The day before the attack the boy had searched on Google for “how to burn someone’s house down”, an Old Bailey jury was told.
He had threatened Maleha Masud, 15, that if she did not continue in the relationship he would “do something to her and her family”, it is alleged.
Maleha died three daysafter the fire in Tooting, south London, in June last year and her sister Nabiha Masud, 21, died a month later.
The girl’s ex-boyfriend, who cannot be named because of his age, is alleged to have started the fire with Shihabouddin Choudhury, 21, and Rasal Khan, 19.
Jonathan Laidlaw QC, prosecuting, said the older defendants had become involved simply to help the boy “in his attempt to seek retribution and exact revenge on Maleha and her family”.
Choudhury, of Coventry Road, Nottingham, and Khan of Earl Howe Street, Leicester, both waiters, each deny both murders, as does the 14-year-old. All three also deny the attempted murders of the girls’ mother Rubina Masud, and brothers Zain and Junaid.
Laidlaw said that Maleha had been in a “relationship of sorts” with the 14-year-old but it was not a serious one.
“The two of them broke up and it was then that (the boy) threatened Maleha that if she did not continue in the relationship he would do something to her and her family,” he added.
“Why he should arrive at the extraordinary decision to burn down their house is really impossible to understand.
“It was obviously not the reaction of an ordinary and normal 14-year-old, however hurt he might feel about losing a girlfriend.”
The court heard Mrs Masud and her eldest son leapt from the window after the fire was started by the three defendants in the early hours of June 21 when petrol was poured through the family’s letterbox as they slept. But her two daughters and youngest son were left inside. Neighbours woken by the screams who tried to get into the house were driven back by the heat.
Junaid, who was rescued by firefighters, suffered burns and lung damage that left him fighting for his life in intensive care but he survived, jurors were told.
But his youngest sister Maleha had stopped breathing when she was discovered curled up at the bottom of her bunk bed. She was resuscitated but had suffered carbon monoxide poisoning and brain damage and her life support was withdrawn three days later.
Doctors hoped older sister Nabiha might survive despite being badly burnt and poisoned by fumes.
She was transferred to a specialist unit in Chelmsford, Essex, but her condition deteriorated and she died of major organ failure on July 25.
Friends of Maleha would later tell of her relationship with the 14-year-oldboy and threats he made to her, the court heard.
Analysis of his telephone calls and of the other defendants’ phones before the attack showed his contact with Choudhury, and their movements, Laidlaw said. After the boy was arrested, police discovered a petrol can at his home with traces of the same kind of fuel used in the fire, jurors were told.
The trial continues.