The Jerusalem District Court on Thursday upheld the city's Magistrates' Court decision to reject the police's appeal and order the release of Rabbi Yitzhak Shapira from custody.
Rabbi Shapira, who heads the Od Yosef Chai Yeshiva located near the West Bank settlement of Yitzhar, was arrested earlier this week on suspicion that he was aware that a number of students from his yeshiva were behind the torching of a mosque in the Palestinian village of Yasuf but failed to report this to police.
Judge Yoram Noam said in his ruling that there was no reasonable suspicion that the rabbi was involved in the arson attack.
"Even the Shin Bet's investigation material indicated that the rabbi was not involved in the arson itself," said the judge.
The court delayed Shapira's release by a few hours to give police ample time to file an appeal with the Supreme Court, but no such appeal was filed.
Earlier Thursday, the Jerusalem Magistrates' Court released two yeshiva students who were arrested for suspicion of involvement in the fire. Only two suspects remain in police custody.