One of the core functions of the courts in the Ottoman Empire was to allow the government to keep its officials in check, and to allow subjects to challenge abuses of power. In this court case from Cairo in 1672, the commander of Muwaylīḥ fortress on the Hijaz coast, in what is now northern Saudi Arabia, is accused of aiding a pirate attack on a boat belonging to an Upper Egyptian merchant.
The merchant brought the lawsuit in al-Dīwān al-ʿĀlī, the council of the Ottoman governor of Egypt, which functioned as a sharīʿa court as well as an administrative council. When operating as a court, a qāḍī presided over the proceedings, as in any other sharīʿa court, but in many cases, such as this one, the governor attended as well. The reason that the lawsuit was brought in Cairo is not only that the plaintiff was Egyptian. While the Ottoman Hijaz was governed by a semi-autonomous dynasty, its military administration was the responsibility of the governor of Egypt. Muḥammad Āghā, the fortress commander, was therefore subject to the jurisdiction of governor Ibrāhīm Pasha.
The military status of the defendant also helps explain the frustrating lack of a clear conclusion to this case. After the plaintiff provides evidence, the qāḍī finds Muḥammad Āghā guilty of aiding the pirate attack, but specifies no punishment or compensation. Instead, according to the document, he simply imposes “what the sharīʿa deems necessary.” As the defendant was a military officer, the qāḍī’s role in this case was simply to determine the facts and assign liability. Any penalties were likely decided by the military authorities, possibly by Ibrāhīm Pasha himself.
No registers of the Dīwān al-ʿĀlī survive from this period; the earliest extant register is from 1741. This case has survived in the form of a ḥujja, the certificate issued by the court to litigants at the conclusion of a case, a copy of which was made in the register. To be precise, the document is a certified copy of the ḥujja. It is now held at the Başbakanlık, the central Ottoman archives in Istanbul, which suggests that the case was sufficiently important to have been reported to the central government.
 On the function of the Dīwān al-ʿĀlī, see James E. Baldwin, Islamic Law and Empire in Ottoman Cairo (Edinburgh: Edinburgh University Press, 2017), 37-9, 63-71.