On June 6, 2020, the 19-year-old accused Danyal Hussein stabbed Nicole Smallman (27) 28 times and Bibaa Henry (46) eight times at the Fryent Country Park in Wembley town, the BBC reported.
The incident took place during Henry's birthday party at the park.
During the opening of the trial on Wednesday, the prosecution said that the police found a note purporting to be an agreement between the teenager and a demon from Hussein's room, the prosecution said.
Opening the case, prosecutor Oliver Glasgow said: "He (Hussein) promised to sacrifice women in order to win the lottery and not to be suspected of the crimes he had committed.
"It would appear that the defendant had confidence that his plan would work since following the fatal attacks upon Bibaa Henry and Nicole Smallman, the defendant purchased several lottery tickets and there were three lottery tickets folded up inside the note (found in his room).
"As it turned out, the demon did not come good on the bargain, since not only did the defendant not win the lottery but the police identified all the evidence that links him to these two murders."
The accused has denied of committing the murders.
Regarding the note, Glasgow said that "given it was found in his bedroom, has his finger and thumbprints upon it, and is signed in his name and in his blood, the identity of the author may not prove difficult to discern", the BBC reported.
The trial is set to last for four weeks.