BEIJING (Reuters) - China’s capital is targeting factories and warehouses illegally leased out as flats in a campaign to eliminate fire hazards after a blaze in an apartment block killed 19 people, state television reported on Thursday.

A migrant worker rides a tricycle filled with luggage as he was forced to move out of his apartment before midnight at a village outside the sixth ring road in Tongzhou district of Beijing, China, November 23, 2017.REUTERS/Jason Lee

The crackdown has forced many migrant workers living in basements and warehouses to pack up and leave, media reported, while a flurry of logistics and delivery companies have been hit by emergency rules that closed some warehouse centres.

Authorities were alarmed by a fire that broke out on Saturday in Beijing’s southern Daxing district, killing 19 people. An investigation found the fire started in a large refrigeration storage area that had been illegally built in the basement, according to CCTV.

The apartment block is near many warehouses and factory buildings that pose fire hazards, media reported.

The city government has ordered 40 days of checks in a “blanket search and investigation campaign that will cover every single village and household”, CCTV said.

Inspectors said it has been a “cat-and-mouse chase” as many illegal landlords had ignored warnings. But this time, the punishment would be “most severe” in solving the problem once and for all, according to CCTV.

A migrant worker rides a tricycle filled with luggage as she was forced to move out of her apartment before midnight at a village outside the sixth ring road in Tongzhou district of Beijing, China November 23, 2017 REUTERS/Jason Lee

Dozens of people were seen leaving one of the apartment blocks, in Beijing’s Tongzhou district on Thursday, when Reuters visited. Forced evictions in the district have been reported.

A banner could be seen with the message: “crack down on illegally rented apartments”.

Migrant workers ride a tricycle filled with luggage as they are forced to move out of their apartments before midnight at a village outside the sixth ring road in Tongzhou district of Beijing, China, November 23, 2017. REUTERS/Jason Lee

The people said they had to leave by Thursday night but did not give a reason.

A landlord of another apartment block in the area told Reuters several nearby apartments would be cleared in coming days.

The campaign has also affected some restaurants and small businesses in Beijing’s ancient hutong alleyways.

A noodle restaurant in the Xicheng district said in a notice put up on its shop front, the government had suspended its operations due to safety checks.

The capital has been sanitising its hutong alleyways, home to millions of migrants workers and thousands of small businesses, bulldozing illegal constructions and forcing shops, bars and tiny courtyard restaurants to relocate or close.