During Ottoman rule between the 16th and early 20th centuries, the school functioned as a courthouse for the city's qadis ("judges"), hence its Arabic name al-Mahkamah ("the Court.")[3] In the late 19th-century Swiss scholar Max van Berchem found a Kufic inscription fixed over the mihrab ("pulpit") of the mosque that belonged to the tombstone of Muhammad ibn al-Abbas al-Hashimi,[4] a member of the Hashemite family who had died in Gaza in the late 9th-century.[5] On top of the mosque's entrance is the foundation inscription crediting Birdibak for the mosque's construction and honoring Sultan Inal.[6]