The government today abolished a 20-year-old vagrancy regulation that human rights organizations said had allowed police to imprison people at will, leading to numerous detentions and the deaths of hundreds of detainees.

Elimination of the regulation at a meeting of the State Council, chaired by Premier Wen Jiabao, was the latest example of small but significant political changes instituted by Wen and President Hu Jintao since they took power in mid-March. As the government openly discussed other possible steps toward limited political reform, an influential Communist Party magazine ran an article this week calling for more democracy within the party.

The decision by the State Council, China's cabinet, followed the highly publicized death in police custody of Sun Zhigang, 27, a graphic designer detained in the southern city of Guangzhou in March.

He Weifang, a Beijing University law professor who has lobbied to change the rule, called the council's decision "a very good sign," adding, "This is a rare example of the voice of the people affecting a government measure."

Under the 1982 vagrancy law, officially called a regulation on "Custody and Repatriation of Homeless Beggars," police could jail without cause anyone who did not have an identification card, temporary residence card or work permit. Those detained were often incarcerated in one of about 700 detention centers throughout the country, run jointly by the Ministry of Civil Affairs and the police.

In a short dispatch on the State Council's action, the official New China News Agency said the regulation was abolished because it "no longer met the needs of the new system." It said the regulation would be a new measure "to assist homeless beggars in urban areas."

Chinese legal sources said the new law might provide voluntary shelter for migrants and the homeless, patterned after an experimental program in Tianjin, 90 miles southeast of Beijing. For the past three years, police there have been forbidden to detain migrants. Instead, the city offers to let migrants stay in the detention centers voluntarily.

The news agency dispatch did not say whether the estimated 1 million people who are in custody as a result of the vagrancy regulation would be released. Most of those incarcerated have been migrant workers, whose numbers have increased during an economic boom along China's eastern coast that has attracted poor farmers looking for jobs. While 15 percent of detainees may be in such centers voluntarily because they are homeless, the rest are held against their will, according to reports in state-run news media.

Lawyers and human rights activists have charged that police distorted the now-abolished regulation, using it to fill arrest quotas during scheduled roundups. Police would descend on poor districts of a city, rip up work permits and temporary residence cards, and send otherwise legally registered migrants to the centers, according to former police officers and workers.

In Beijing, police routinely detained hundreds of migrants, dispatching them to Changping county in the suburbs and forcing them into hard labor until they "earned" their trip home, according to the China Business Post. Sometimes people were caught in the system for months or years. After a while, Beijing police simply sent the migrants home and extorted money from their families, the newspaper said.

The human rights organization Amnesty International has reported that conditions in detention centers were "appalling" and detainees were frequently subjected to "cruel, inhuman and degrading treatment."

"This system effectively permits the arbitrary detention of individuals who are not suspected of committing any crime," said an Amnesty report. Amnesty and other sources have said the system was also employed to detain people, often for long periods, as a source of revenue or free labor for local authorities.

Despite long-standing international and legal criticism of the regulation, many educated Chinese were unaware of its draconian provisions and the detention centers because mostly poor people were involved, and their cases were not publicized.

But Sun's case gained wide attention following a report in the muckraking Guangzhou daily newspaper, Southern Metropolitan News. The report showed that members of the urban elite and not just luckless peasants were subject to such treatment.

The investigation and subsequent news reports detailed the police detention of Sun as he walked from his apartment to a nearby Internet cafe at about 10 p.m. on March 18 in Guangzhou, the capital of Guangdong province. Sun was a college graduate who, like millions of his classmates, had gone to a large city for work. Police that night were on a mission to round up vagrants and apparently had quotas, according to the reports. Sun was stopped by police and was detained because he was not carrying his identity papers. The next day, a friend went to the police station with Sun's ID card, but police would not release him, the news reports said.

Sun was sent to a detention center and then to a medical ward. A nurse's aide, Qiao Yanqin, kicked Sun several times and placed him in a holding cell with eight other inmates, who were told to beat him as well, according to a New China News Agency report. Sun died on March 20.

On June 9, the nurse's aide was sentenced to death and 11 police officers and detention center inmates and officials received prison sentences, the news agency said. In addition, more than 23 officials, including senior police in Guangzhou, have been sacked or censured for their ineffective actions, which contributed to Sun's death, state-run media reported.

A group of Beijing-based scholars seized on the case to lobby for a change in the vagrancy rule, saying it clearly violated constitutional protections against random incarceration. In May, three legal scholars petitioned the National People's Congress, seeking repeal of the regulation on grounds it was "inconsistent with our country's constitution and laws."

Teng Biao, one of the scholars, said in a telephone interview that "it appears that the new regulation will do away with blatantly illegal practices, so it's an improvement. But we need to be sure the new regulation doesn't have other elements that make it just as bad."

Chinese police retain broad arrest and detention powers, according to legal sources. For example, a mid-level police officer can sentence almost any suspect to three years of hard labor without judicial review.

A homeless woman and child doze on a Beijing sidewalk, with a cup beside them to collect coins from passersby. Many children of unemployed Chinese were jailed for years under the now-abolished vagrancy regulation.