Before the 1842 Treaty of Nanking, which ended the First Opium War, foreign merchants were not satisfied with the state of the Qing legal system. British merchants were "suspicious of what they regarded as a tendency in the Qing legal order to impose collective responsibility; they were also resentful of the Qing practice of meting out capital punishment in cases of accidental manslaughter". After a controversial 1784 case where a British gunner was executed for accidentally killing a Chinese subject, East India Company officials generally spirited away Britons before Qing officials could react.