There were also unspecified amounts of calcium carbide, a highly flammable chemical used in welding; sodium hydrosulfide, an extremely toxic compound used in mining that can turn into a volatile gas when heated; and toluene diisocyanate, a compound used to make plastics that explodes when exposed to heat.

A year earlier, the stockpile was even larger. According to a routine safety inspection in June 2014, there were 4,261 tons of hazardous chemicals at Rui Hai.

Experts say storing such large quantities of chemicals at one site is dangerous, because it heightens the risk of an explosive reaction and can exacerbate the damage caused by fire. “It’s an incredible amount,” said Neal Langerman, a chemical safety consultant in San Diego. “If you’re going to have large quantities, you really have to do it right. If you do it right, it costs you money.”

Chinese regulations require that hazardous chemicals be kept in well-ventilated areas, far from sunlight, power cords and other heat sources. But Rui Hai’s warehouses were known for shoddy construction and outdated equipment, people involved in shipping chemicals from the warehouse said.

Chemicals are also supposed to be stored separately and at safe distances to reduce the risk of reactions. But Rui Hai often crammed containers full of different dangerous chemicals next to each other, former clients said.

Hu Jianzhong, a manager at a Tianjin logistics firm, said Rui Hai packed the containers together because the authorities had not allowed warehouses to devote more space to hazardous materials, even as the volume of chemicals going through the port increased in recent years. The safety assessment conducted by the private company before Rui Hai obtained its license noted that containers were stacked three high when two should be the limit.

Rui Hai was not the only facility with problems. A survey conducted in 2010 by the Ministry of Environmental Protection found that half of China’s oil processing, coking, chemical and pharmaceutical plants were located within less than a mile of sites like schools and residential areas, in violation of regulations. And many Chinese chemical firms have cut back on safety training and ignore guidelines on storage to save on warehouse space, said Paul Pang, vice president of IHS Chemical, a research firm in Shanghai.

The government says it has contained the fallout from chemicals at the blast site, but residents in Tianjin remain worried about the long-term effects of the toxins scattered in the explosion. “It might take decades for them to figure out the impact of so many chemicals in the air and water,” said Zhang Yangyang, 29, a lawyer wearing a respirator who emerged from her home lugging a bag of possessions. “This is not a risk I’m willing to take.”