The Palestinian teenager who stabbed IDF soldier Eden Atias to death on an Afula bus last November was sentenced to life, plus three years on Monday.

The 16-year-old, whose name was withheld due to his age, is a resident of the West Bank city of Jenin and was residing illegally in Israel prior to perpetrating the attack.

Atias, 19, was asleep on the bus when he was stabbed 17 times by his attacker.

“The defendant chose not to stab the Border policeman who sat a short distance away from him, and deliberated whether to hurt the male or female soldier on the bus,” the court decision said, according to Channel 2. “After cold, calculated consideration, he decided to attack and stab the male soldier, because he thought that if he attacks the female soldier, the male soldier would come to her aid.”

The decision said that when the bus arrived at the Afula Central Bus Station, where the attack occurred, only the perpetrator, the female soldier, and the sleeping Eden Atias remained on the bus.

“He clutched his [Atias’s] head and mouth in his hand, to prevent him from struggling, and with his right hand slit his throat with a knife while he [Atias] was asleep,” it said.

Atias had enlisted only two weeks earlier and was still in basic training. He was traveling to his base after a sick leave.

During his interrogation, the suspect claimed that he had acted to avenge his relatives, who are imprisoned in Israel for terrorist activity. Reports have indicated two of his family members are in jail for convictions related to the murder of Israelis.

The court claimed the murder was on “ideological grounds,” the “murder of Jews for being Jewish.”

The teenage killer was indicted in December and convicted in June.

Times of Israel staff contributed to this report.