Discrimination on the grounds of sexual orientation or gender identity is forbidden in contemporary international human rights law, yet in many interpretations of Islamic law, this is seen to contradict the tenets of Islam. Vanja Hamzić here offers a path-breaking historical and anthropological analysis of the discourses on sexual and gender diversity in the Muslim world. The first of its kind, the book sheds new light on the understanding of diversity and resistance to hegemonic visions of the self in Muslim societies. Combining first-hand ethnographic accounts of Muslims in contemporary Pakistan―including the hijra community whose pluralist sexual and gender experience defy the disciplinary gaze of both international and state law―with new archival research, this book provides a unique mapping of Islamic jurisprudence, court practice and social developments in the Muslim world. Hamzić provides a comprehensive look at the ways in which sexually diverse and gender-variant Muslims are seen, and see themselves, within the context of the Islamic legal tradition.