Buildings for the reporting of dangerous conditions.

The worker who died, Carlos Moncayo, 22, an Ecuadorean immigrant who lived in Queens, was crushed by thousands of pounds of dirt when the walls of a site in the meatpacking district, steps from the High Line, collapsed around him on April 6.

Prosecutors said on Wednesday that the two managers — Wilmer Cueva, of Sky Materials, and Alfonso Prestia, of Harco Construction — had ignored repeated warnings for months from private inspectors that treacherous conditions existed at the site on Ninth Avenue.

City and federal regulations require that any excavations deeper than five feet must be shored up to prevent the walls from caving in. But in this case, at a site where a Restoration Hardware store will occupy the former home ofthe restaurant Pastis, the trenches went as deep as 14 feet and lacked any fortification, according to prosecutors, citing emails and other evidence.

On the morning Mr. Moncayo died, prosecutors said, another private inspector noticed a seven-foot-deep trench, and alerted Mr. Prestia, who was inside a trailer at street level and unable to see inside the pit. The inspector also notified Mr. Cueva, who was at the site, supervising work. But Mr. Cueva did not do anything initially, prosecutors said. Nor did Mr. Prestia.

By the time the pit reached about 13 feet, two hours later, Mr. Prestia told the workers, in English, to get out. But the workers, who spoke mainly Spanish, did not. Not long afterward, the walls collapsed, crushing Mr. Moncayo.

Two weeks ago, the Buildings Department issued