The Ottoman-Russian wars of the eighteenth century reshaped the map of Eurasia and the Middle East, but they also birthed a novel concept - the prisoner of war. For centuries, hundreds of thousands of captives, civilians and soldiers alike, crossed the legal and social boundaries of these empires, destined for either ransom or enslavement. But in the eighteenth century, the Ottoman state and its Russian rival, through conflict and diplomacy, worked out a new system of regional international law. Ransom was abolished; soldiers became prisoners of war; and some slaves gained new paths to release, while others were left entirely unprotected. These rules delineated sovereignty, redefined individuals' relationships to states, and prioritized political identity over economic value. In the process, the Ottomans marked out a parallel, non-Western path toward elements of modern international law. Yet this was not a story of European imposition or imitation-the Ottomans acted for their own reasons, maintaining their commitment to Islamic law. For a time even European empires played by these rules, until they were subsumed into the codified global law of war in the late nineteenth century. This story offers new perspectives on the histories of the Ottoman and Russian Empires, of slavery, and of international law.