Custody and repatriation (C&R; Chinese: 收容遣送; pinyin: shōuróng qiǎnsòng) was an administrative procedure, established in 1982 and ended in 2003, by which the police in the People's Republic of China (usually cities) could detain people if they did not have a residence permit (hukou) or temporary living permit (zanzhuzheng), and return them to the place where they could legally live or work (usually rural areas). At times the requirement included possession of a valid national identity card. The system was abolished in 2003 after the death of Sun Zhigang, a migrant worker who died from physical abuse while being detained under the C&R system in Guangzhou.
In China there were reported to be some 800 detention camps in 2000 (not including Beijing), and by then several million people had been through them. As well as migrant workers, the Chinese camps usually contained vagrants, beggars, petitioners, and criminals, and the police (Public Security Bureau) earned income by this traffic and sometimes workers' unpaid labor. Often the detentions were unfairly long.
The ostensible reason for the C&R regulation in 1982 in China was to ameliorate the situation of people in the cities who were beggars or homeless. Originally it applied to "three withouts persons," those with "no fixed place of residence, no means of livelihood and no permits to live in the city in question" but later it was applied in 1991 to others without just the residence or work permits. It built on a 1961 Party directive implementing the hukou system of residence (traditional family registers found in several Asian countries), work permits (issued by police on behalf of work units or employers) to prevent uncontrolled population movements, as passports and visas do internationally, and Resident Identity Cards. In turn, this regulation extended older rules that were used to enforce extrajudicial movements of Nationalist troops away from liberated cities. But as the economic development of cities in the east later required increased domestic migrant workers, the regulations were not adequately adapted or were unfairly enforced, by the Public Security Bureau (police, supposed to be in charge of deportation) instead of the Ministry of Civil Affairs (supposed to be in charge of detention). These abuses became apparent in years before 2003 and there were internal and external warnings and discussion, with some improvements but little effect overall. There were some unpublicized deaths similar to what later occurred.