She was held for months without charge or trial, forced to labour seven days a week without wages, and made to pay for her incarceration. Pan Li is one of hundreds of thousands who have been held at their own expense in China's little known detention system for female sex workers and their clients. "It's supposed to be about the good management of people. Actually, it just makes money from prostitutes," she said.

Beijing has heralded this year's decision to abolish re-education through labour (RTL) camps, long condemned for lack of judicial oversight. But human rights groups say it is partial progress at best, given the persistence of similar measures allowing imprisonment without trial.

Thousands of people are still thought to be held in a parallel system known as "custody and education", overseen by public security officials rather than judges. Unlike prisoners, or RTL inmates, the detainees must pay living costs and take compulsory tests for sexually transmitted diseases.

"The original intention … was to penalise unlawful behaviour that did not reach the level of a criminal offence but it has become a penalty even harsher than criminal penalties," warns a new report from Asia Catalyst, a health and human rights group that wants the system abolished. Few have even heard of it, not least because stigma and fear of retaliation make former detainees reluctant to discuss it.

"I work with drug users and people with HIV, but to me sex workers are the most voiceless in society," said Shen Tingting, advocacy director of the New York-based organisation. Pan, in her late 30s, never explained to her family why she had vanished. Her name has been changed to protect her identity. But she spoke to the Guardian to expose the "dirty, ugly, corrupt hell" she endured.

Estimates suggest China has between two and six million sex workers. Though often tolerated, prostitution is illegal and there are periodic crackdowns. Not all detentions lead to custody and education; police in some areas prefer fines or other measures. There is little official information on the system and the ministry of public security did not respond to calls or faxed queries.

But Asia Catalyst said 28,000 were held in 2002. Although fewer are detained now, the number could rise again because sex workers were also sent to RTL camps. Corinna-Barbara Francis of Amnesty International warned that other RTL detainees were already being transferred to other forms of custody.

Pan had never heard of custody and education, so she rejected a policeman's offer to free her for 30,000 yuan (£3,000) – six times the maximum legal fine. Sex workers believe raids are often a source of income for agencies and individuals. She knew she would have to serve 15 days in police detention. "When I realised there was another six months, I was shocked," she said.

Her camp in northern China housed about 200 women, with men held separately. They rose at 6am and went to bed at 9pm, but lights stayed on around the clock, with one inmate on duty to watch the others sleeping three or four to a bed. "If you farted or snored they would punish you by making you stand," she said. Guards cultivated favourites, who were encouraged to police the others and abuse them for minor infractions: "It wasn't physical, but people would scream at you. If they don't like you, they will find every way to punish you."

Asia Catalyst's report said centres made some efforts to educate detainees, including improving their literacy and awareness of sexually transmitted diseases. But it added: "The 'educational' objective … has been distorted into a profit-making mechanism." Pan worked five or six hours a day packing goods, though those interviewed by Asia Catalyst described far longer days which often ended late at night. Inmates at her camp were allowed to read women's magazines on Saturday mornings. "Other than that, there was no education at all," she said.

In the first few weeks, training meant drills on the centre's rules. "What time you sit, what time you stand up, what time you eat, what time you work, what time you go to the toilet – it's all fixed," said Pan. "You have to sit on the bed like this," she explained, with her back ramrod straight, her legs together and her hands on her knees. "If you don't follow orders they insult you. Because we were all prostitutes, they would say, 'You don't have men to fuck you so you don't feel good, but you cannot open your legs.'"

The biggest cause of bitterness for many was having to pay for their own incarceration: an initial fee of around 1,900 yuan (£190)covered bedding, uniforms and basic meals, but better food, and essentials such as soap or sanitary towels had to be bought. Prices were ,many times higher than outside and there were were transaction fees. She spent over 5,000 yuan (£500) in three months on such goods.

Asia Catalyst noted that centres rely on such income because their funding is inadequate. One woman told researchers she was detained for two extra months because she could not pay. Other payments are illicit; Pan said a friend found someone to arrange her early release for 50,000 yuan. "I felt like death was better than living when I was in there," she added, wiping away a tear. It would take at least six months' work to cover the costs of her detention and release. She only knew one way to make the money. Most of the women come from poor backgrounds; they lack education and many, like her, have families to support.

"Nobody changes their career," she said, despite the name of the system. "All we learned is that if you have power and money it's good and if you are poor it's bad. It was an education in how to bully people."

Additional research by Cecily Huang