When Mehmed II took Constantinople in 1453 he converted Hagia Sophia into a mosque and, within months, installed a new Greek Orthodox patriarch in the city and confirmed his authority over the Orthodox population. Both acts belong to the same policy. The Ottomans governed a religiously plural empire by recognising communities rather than individuals: Orthodox Christians, Armenians and Jews held their own courts for family and religious law under their own hierarchs, who were answerable to the sultan for the good behaviour and the taxes of their flocks. The arrangement, later systematised and named the millet system, is what Karen Barkey analyses as a state built to manage difference rather than to erase it, and it is why the Sephardim expelled from Spain in 1492 were received in Ottoman cities.
Islamic law had its own hierarchy inside the state. The empire developed a graded corps of madrasas and judges culminating in the shaykh al-Islam, whose legal opinions could sanction a war or, on occasion, a deposition, and it ran sultanic law, kanun, alongside sharia in the areas the sacred law left to the ruler. Suleiman, called the Magnificent in Europe, is called the Lawgiver in Turkish for that codification.
The arrangement had a hard edge. Non-Muslims paid a distinguishing tax and lived under legal disabilities, and until the seventeenth century the empire levied a periodic tribute of Christian boys from the Balkans, converted and trained for the palace and the janissary corps.