JERUSALEM — The two teenage cousins met after school, discussed the tensions surrounding the Aqsa Mosque and other issues angering the Palestinians. They decided to avenge their grievances with knives.

The younger one, Ahmad Manasra, 13, took a decorative six-inch blade from a cupboard in his parents’ bedroom, according to newly released legal documents. Hassan Manasra, 15, armed himself with a large kitchen knife. The pair then set off for a neighboring Jewish area of East Jerusalem.

Details of the case emerged on Monday when an Israeli court sentenced Ahmad to 12 years in prison for his role in the October 2015 stabbing attack that critically wounded an Israeli boy, who was 13 at the time, and an Israeli man. Hassan was fatally shot by police as he ran at them with his knife near the scene of the stabbings.

Grainy security camera footage that partly captured those events provided some of the most enduring images of the wave of violence that began that month and has since largely subsided.