Jus naufragii
The jus naufragii (right of shipwreck), sometimes lex naufragii (law of shipwreck), was a medieval custom (never actually a law) which allowed the inhabitants or lord of a territory to seize all that washed ashore from the wreck of a ship along its coast. This applied, originally, to all the cargo of the ship, the wreckage itself, and even any passengers who came ashore, who were thus converted into slaves.