The Case of the Animals versus Man is a 10th-century Arabic philosophical text about a court case held between humans, arguing that animals should rightfully be their slaves, and animals, arguing that they deserve the right to be free of humans. It was written by the Brethren of Purity, a secret society of Muslim philosophers, and the text is semi-religious in nature, making frequent references to the Koran and specific passages therein to support the arguments made by both sides in court.
The court case is presided over by Bīwarāsp the Wise, king of the "jinn" who live on the island of Ṣāʿūn, "lying near the equator in the midst of the Green Sea". It appears that these jinn are neutral in the dispute between humans and animals. But in this context, what are jinn, exactly? Are they considered as supernatural beings? They seem to be creatures that inhabit the earth alongside us, and can convert to Islam like humans ("Muhammad [...] called men and jinn to God and to Islam. One band of jinn answered his call and became good Muslims.") but are neither considered as humans nor as animals. Is this consistent with some contemporary Islamic tradition regarding jinn, or are they inserted into this text purely in order to have a neutral party in the debate? What is the cultural background behind the inclusion of "jinn" in this story?
Quotes are from this English translation by Lenn E. Goodman and Richard McGregor.