In 1874, a ship arrived in the port of San Francisco carrying 600 passengers from China. A state official inspected the passengers and determined that 22 Chinese women, who were traveling alone, were prostitutes. He required a bond of $500 each for the women to disembark. The captain refused to post the bonds, and the women were detained under California law. Legal proceedings followed, including a four-day trial and appeals all the way to the United States Supreme Court, in Chy Lung v. Freeman, raising issues of due process, human and civil rights, and the power of states to regulate immigration.