IT WAS A MORNING of laughter and then tears for pupils of Keyang Hope School in Beijing's Shijingshan district. As they were playing in the grounds during a break on Tuesday, a dozen education officials, city inspectors and police officers arrived to announce that their school would be closed.

Distressed, many of Keyang's 1,100 pupils begged officials to keep the facility open. 'Why our school instead of others?' asks one tearful child. 'I'd like to stay here. I can't see anything wrong like the officials say. At least, it prevented me from being illiterate,' says 13-year-old Guo Chunyan.

Keyang is among 239 unlicensed schools for migrant workers' children targeted in a crackdown by Beijing authorities. According to a government notice on August 9, most are substandard and face closure if they fail to meet health and safety criteria. The announcement called on the estimated 95,000 pupils affected to enrol instead in government-funded schools when the new term starts today. But organisers of the unlicensed schools say official criteria are unfair and question the ability of public schools to handle the influx of migrant children. Ignoring the government order, they have begun lessons ahead of schedule but are intermittently suspended by the authorities.

Poor migrant children are caught in the tussle. Many have been denied access to public schools, which charge additional tuition fees for non-residents as well as 'donations' which can amount to thousands of yuan. Although unhappy with the poor management and quality of unlicensed schools, some parents worry their children will struggle to adapt to new textbooks and may be looked down upon by teachers and fellow students.

Tao Yuhai, a vegetable vendor, says he has tried to register his daughter at nearby public schools but was either told they had no vacancies or that she failed the entrance exams. 'These are all excuses. They just look down upon migrant children fearing that they spoil their image,' he says. He eventually enrolled his daughter at Mingyuan School in Haidian district.

Children who have attended public schools aren't always impressed. Wang Xiaoping, who transferred to Mingyuan after spending three years in state schools, says: 'The conditions here aren't good, but we learn more than in public schools because our textbooks are more difficult. The third grade here is equivalent to their fourth grade.'

'I don't like studying with Beijing kids. They bully us,' says Wang Xiaomeng, a fifth-grader at Ming-yuan, who spent three terms at Xiaojiahe government primary school.

In the past few years, the number of privately run schools has mushroomed in the suburbs of Beijing where migrant numbers are concentrated. Most are crowded, and operate out of rundown buildings with bare electrical wires, broken windows and neither heating nor air conditioning.

A few have improved their facilities thanks to donations that came on the back of media exposure, but most don't have the funds to meet basic health and safety standards. Among other criteria, regulations require schools to have at least 1.5 million yuan in start-up funds, own their premises and a 200-metre long space for children to run around in.

'If the schools don't have their own buildings, they may rent cheap sites that are unsafe,' says an educational official from Haidian who declined to be named. 'Requirements such as the start-up funds are imposed to ensure children have adequate facilities.'

However, heads of migrant schools say the conditions are unrealistic. 'It's nearly impossible for us to meet the requirements,' says Jia Nan, principal of Mingyuan School, whose license was revoked because its building was rented. 'Do you know how much it costs to build a three-storey school here? Three million yuan at least. And we have to build it with our own hands.'

Principals of the few legal migrant schools acknowledge that their licenses were approved mainly because of the publicity they got. 'Our facilities are more or less the same as those of [unlicensed] schools. We also rent our premises. But we get more public attention,' says Yi Benyao, principal of Haidian Xingzhi School.

A photograph in his office is revealing: Taken on International Children's Day in 2004, it shows pupils celebrating the occasion with Premier Wen Jiabao.

Principals of migrant schools say the state system doesn't have the capacity to absorb the large numbers of migrant children and fear the crackdown will only force pupils to drop out or return to their ancestral villages without their parents.

The order to close six of the seven migrant schools in Yamenkou in Shijingshan district, will affect at least 4,000 pupils. But Xiangyang School, the sole state facility in the area can only take another 250 students.

'We're trying to accept as many students as we can. If there aren't enough classrooms, we will use meeting rooms,' says Xiangyang's principal, Li Runhua.

But even if there was sufficient space, state schools may not have the teachers to cope with a flood of migrant children. 'Many teachers in our school are teaching two or more subjects already. We're desperately short-staffed,' says Gao Hong, a teacher at Xiangyang.

Chu Zhaohui, from the China National Institute for Educational Research, lauds the campaign to rein in poorly run schools. 'But it's come suddenly during the summer holiday so it's hard to inform migrants who have little access to information. There isn't enough communication between the government and parents,' he says. 'Besides, officials have failed to do thorough field studies, which has led to difficulties in allocating affected students to public schools.'

To address the problem, education officials say public schools will get additional subsidies to expand classes. Officials have also done away with some requirements such as the non-resident tuition fee. Migrant parents who don't have the necessary papers, such as residential permits, can still send their children to public schools if they pay 160 yuan in addition to the standard 200 yuan tuition fee. That's only slightly higher than the 300 yuan minimum tuition charged by privately run schools.

'We've devised a favourable policy to ensure every migrant child can have the same education as others, but some schools oppose it out of commercial concerns,' says a Shijingshan district education official who identified himself only by his surname, Duan. 'The paperwork fee will be reimbursed if parents get the required documents. Those who are extremely poor can also apply for grants. We won't let any migrant child drop out.'

At Keyang, a woman who presented herself to reporters as a distressed parent turned out to be one of the school's 57 teachers, many of whom may not be able to get jobs elsewhere. 'We can't hire these teachers because most don't have teaching certificates,' says Xiangyang's principal, Li.

Teaching standards vary considerably at unlicensed schools, Li says. At his state school, some transfer students from Keyang cite corporal punishment as a reason for leaving. 'I was made to kneel to do my homework when I couldn't finish it in time,' says Ma Shuang, a nine-year-old who switched to Xiangyang four terms ago.

Some unlicensed schools have also angered families by keeping news of the closure order from them on enrolment day last week, and parents are demanding that tuition fees be reimbursed if the directive is enforced.

'I didn't know about the closure until my neighbour told me today,' says Wu Ju, a domestic helper from Anqing in Anhui province. 'If I had known it earlier, I could have taken my son home or sent him to a public school. Now it seems too late.'

Some parents such as Tao still prefer to keep their children in migrant schools. 'My daughter is happy [at Mingyuan] with her friends. What will I do if she asks for an expensive dress that classmates [at a state school] have but I can't afford?' he asks.

Chen Lin, a sixth-grader at Keyang, feels the same way. 'I've been here since pre-school. It's closer to my home and this is my last year. I don't want changes,' he says. 'I don't want to move to a public school which is further away and where I have no friends.'