* Safety crackdown followed deadly fire earlier this month
* Beijing govt says blitz solely to protect lives, safety
* Some residents, advocates say migrants bear brunt of evictions
BEIJING - In Xinjiancun, a ramshackle village of migrant workers on the far southern fringe of Beijing, demolition machinery tears into buildings as residents drag out the last of their belongings under the gaze of police and security staff.
A citywide fire safety blitz prompted by a deadly blaze this month is forcing thousands of migrant workers out of their homes and businesses, igniting unusually direct criticism of city government measures seen by some people as unfairly targeting the vulnerable underclass.
Beijing's municipal government launched the 40-day "special operation" targeting fire code and building safety violations after a Nov. 18 apartment fire in Xinjiancun killed 19, almost all of them migrants.
The Beijing government said it had acted on more than 25,000 violations in the operation's first week, which it described as purely "for the lives and safety of the people". Tens of thousands of people are believed to be affected, activists said.
While restaurants and shops not up to code in more affluent areas have not been immune, the safety blitz has mostly targeted outlying parts of Beijing where enforcement of construction codes has tended to be lax, and where migrant workers congregate due to cheaper rent.
"To say that this special operation is to drive out the 'low-end population' is irresponsible and baseless," the Beijing government said in a statement carried by state media on Sunday.
"Some of the migrant population choose these places to work and live in, but they don't understand the danger they're in."
One resident said her family of six, including her nine-month old grandson, had been suddenly rendered homeless, spending the previous night huddled in the back of their minivan in sub-freezing temperatures.
"We are also Chinese people. Why are we being treated this way?" said the woman, from central China's Hubei province.
"What are we to do, where can we go to raise grievances? No one dares to," she said, asking not to be identified due to the sensitivity of the matter.
Local authorities attributed the Nov. 18 blaze to faulty electrical wiring in an illegally modified two-storey property housing shops and a cold storage facility in the basement, with the top floor subdivided into small, crowded living quarters.
More than a dozen residents of Xinjiancun said at least 50 uniformed security guards and "chengguan" - an urban management force which assists police - had smashed their stores' signage and issued threats to ensure compliance.
The Beijing city government and the Daxing district government, which covers the southern part of the city, did not respond to requests for comment.
Xia Xiaocong, a 44-year-old supermarket owner, said he was told to move everything out and leave within 48 hours, after security guards cut his electricity and trashed the front of his shop.
"I told them I have all the legal documents, and they said you have to close and get lost," he told Reuters inside the damaged store, its shelves emptied. Residents and supermarket staff confirmed details of Xia's account.
In Dingfuzhuang, a logistics hub in Beijing's east, residents on Saturday said authorities had cut off electricity and running water to force them out.
"In 2008, it was 'Beijing Welcomes You'," said Liang Yinghui, from northern Hebei province, referring to the slogan of the 2008 Beijing Olympics. "Now, in 2017, Beijing loathes you, and wants to throw you out."
CRITICISM AND CENSORSHIP
An open letter to the Chinese government from more than 100 prominent academics, lawyers and intellectuals said the measures against Beijing's migrant population were "illegal, unconstitutional and seriously trampled on human rights".
Such open criticism of government is increasingly rare as officials have clamped down on various aspects of civil society under President Xi Jinping.
Some non-profit groups that sought to offer assistance said they have been obstructed by police, with their online advertisements blocked by censors.
Tongzhou Jiayuan, a private community service centre in Beijing's Tongzhou district, said it was shut by police soon after posting a notice on social media welcoming struggling migrant workers to come and stay.
On Monday, Beijing party secretary Cai Qi said authorities should have given more time for residents to relocate and called for the operation to be carried out in a more orderly fashion, according to the official Beijing Daily.
Some 8.23 million Beijing residents came from outside the capital, almost 40 percent of its population of nearly 22 million, according to a 2016 report by the state-run Chinese Academy of Social Sciences.
While the city says the clean-up is for safety, it is also consistent with policies to control growth. In September, the central government approved Beijing's plan to cap its population at 23 million in 2020.
Ma Zhitao, 32, who arrived in Beijing at the start of the year to work as a labourer in the hope of providing a better life for his 10-year-old son back home in rural Shaanxi province, said he was now forced to return home.
"I thought it would be different," said Ma, whose power and water had been cut off at his home in Dingfuzhuang.
"It's the capital after all." (Reporting by Philip Wen, Yawen Chen and Irene Wang; Editing by Tony Munroe and Lincoln Feast)