The Jerusalem District Court sentenced Gabai to two years in prison for the arson, ten months for posting incitement on Facebook, and two more months for the possession of a knife.
The court also ordered Gabai, a member of anti-assimilation group Lehava, to pay the school tens of thousands of shekels in compensation.
"The attacks were committed while the area was quite literally ablaze, in an effort to make headlines," Judge Zvi Segal wrote in his verdict. "In addition to violating the values of keeping the peace and public safety, the arson reflects a violation of the values of human dignity, equality and tolerance.
"The arson hurt the general public's sense of security. The defendant's actions were done at a sensitive and explosive time, in the wake of terror attacks committed in the city of Jerusalem," the judge continued.
Despite that, Judge Segal gave Gabai a fairly light sentence.
"The arson offense has the potential of causing inherent damage, as one can never know at the outset what the fire would consume once it has been lit. At the same time, I decided to show leniency due to the fact the school was set on fire on Saturday night, at a time in which no one was supposed to be at the school. It is clear the defendant did not intend to harm other people, and his intention was to damage property," Judge Segal wrote.
Itamar Ben-Gvir, Gabai's attorney, said that "contrary to popular belief, this is not a light sentence at all. This is a young man with no criminal record, and we will of course appeal to the Supreme Court."
More than 600 children attend the Hand in Hand school in Jerusalem, which has an equal number of Jewish and Arab pupils. There are four other such schools in the Hand in Hand network in Israel.
In July, the court sentenced Gabai's accomplices, brothers Nahman and Shlomo Twito to two and a half and two years imprisonment, respectively. The two left the courtroom smiling, singing songs in praise of God and claiming that "it was worth it."
The prosecution sought a four to seven years sentence, but Judge Zvi Segal decided to give them, too, a lighter sentence. In addition to their prison sentences, the court gave Shlomo Twito eight months suspended sentence for three years following his release, and ordered him to pay NIS 10,000 in compensation to the bilingual school. His brother Nahman received ten months of suspended sentence, and ordered to pay the school NIS 15,000 in compensation.
The arson at the Jerusalem school occurred at the height of tensions between the Arab and the Jewish communities on the background of the abduction and murder of the three teenagers, the murder of Mohammed Abu Khdeir and Operation Protective Edge.
According to the indictment, before setting fire to the school the three drove to a gas station and bought gas, while hiding their faces so they won't be identified by the gas station's security cameras.
From there, they drove to the school, where Gabai and Shlomo Twito set fire to one of the classrooms while Nahman Twito sprayed hateful graffiti on the walls, including "Death to Arabs," "Kahane was right," "No coexistence with cancer," and "No more assimilation."