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

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 also near many storage warehouses and factory buildings that pose fire hazards, according to Chinese media reports.

The city government has ordered 40 days of safety 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 repeatedly ignored warnings. But this time the punishment would be “most severe” to solve the problem once and for all, according to CCTV.

Dozens of people were seen walking out with luggage when Reuters visited one of the apartment blocks in Beijing’s Tongzhou district on Thursday, where forced evictions have been reported and a banner which read “crack down on illegally rented apartments” could be seen.

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 other nearby apartments will be cleared in the coming days. (Reporting by Yawen Chen, Irene Wang and Joseph Campbell; Editing by Nick Macfie)