A man accused of planting a bomb on a bus in Tel Aviv during Israel’s brief military campaign in the Gaza Strip in 2012 was convicted Monday morning in the Tel Aviv District Court. Sentencing was set for February.

Muhammad Mafarji, 18 years old at the time of the attack, was found guilty of attempted murder and aiding the enemy during wartime. This was an apparent reference to Hamas, which runs the Gaza Strip.

Mafarji’s lawyer reached a plea bargain with the prosecution, under which the state will not seek a sentence of more than 25 years in prison for the act.

He confessed to the Shin Bet security service that he placed an explosive device on bus No. 142 on November 21, at the time of Israel’s Operation Pillar of Defense against Gaza rocket fire. The bomb detonated near the Israeli military’s headquarters in the center of Tel Aviv, injuring 28 people.

Mafarji, a West Bank Palestinian naturalized through a family reunification procedure some 15 years ago, has Israeli citizenship and could therefore be tried in the Israel’s general court system, unlike non-citizen Palestinians, who are given military trials.

Three other members of his terror cell, all from the West Bank, were arrested in connection with the attack, including mastermind Ahmad Ahmed Moussa.

In May, Mafarji’s lawyer claimed that he was tortured prior to his confession, and that his interrogators deprived him of sleep and uttered threats of violence against him.

Mafarji told investigators that he met Moussa at Moussa’s supermarket in Beit Lakia in the Binyamin region. While out shopping Mafarji declared that he wanted to fight alongside Hamas in Gaza, and Moussa told him to come back later so that they could discuss the matter further.

When Mafarji returned, the two began to plot an attack, the prosecution said. Moussa first told Mafarji to leave a bag on a bus as a test run, which he successfully completed.

The night before the actual attack the two discussed halting the IDF attacks on Gaza and avenging the death of Hamas military commander Ahmed Jabari, who was killed in a drone strike that marked the onset of the Israeli campaign to curb rocket fire from Gaza. Moussa also allegedly questioned Mafarji about Israeli officials that he knew and promised to provide him with a gun so that he could kill Israelis.

Moussa prepared a bomb that could be detonated by cellphone and hid it in a bag of clothes. He then took Mafarji to the checkpoint at Harbata, where the teenager crossed from the West Bank into Israel to meet with the manager of the McDonald’s where he worked. As the two drove to work, Mafarji was said to have faked a phone call in which he claimed to learn that his mother was ill and that he needed to go back to her. After alighting from the vehicle with the bomb he took a bus to Tel Aviv.

Once inside the city he boarded a No. 142 bus and armed the bomb. When the bus reached the planned detonation point, Mafarji got off, leaving the device under the third seat. He quickly called Moussa to tell him the bomb was in place, whereupon the latter detonated the device via his cellphone.

Security camera footage from the Savidor train station in Tel Aviv showed Mafarji after the explosion walking calmly onto the train on his way to work at McDonald’s at the mall in Modiin. He was arrested four and half hours after the attack.

His lawyer claimed in January that Mafarji was an innocent teen who was manipulated.

Mafarji’s sentencing hearing was set for February 17, 2014.