The capital had been bracing for the disaster for years.

Ever since it opened nearly a decade ago, the newest Mexico City subway line — a heralded expansion of the second largest subway system in the Americas — had been plagued with structural weaknesses that led engineers to warn of potential accidents. Yet other than a brief, partial shutdown of the line in 2014, the warnings went unheeded by successive governments.

On Monday night, the mounting problems turned fatal: A subway train plunged about 50 feet after an overpass collapsed underneath it, killing at least 24 people and injuring dozens more.