An inspection in 2018 highlighted "a major error" in the original design of an apartment block that collapsed near Miami, Florida, it has been revealed.
The engineer's report, which has just been made public, said the fault prevented water draining from the base of the seafront Champlain Towers.
Part of the building collapsed on Thursday while many residents slept.
Hopes are fading for the 159 people still unaccounted for. So far, four deaths have been confirmed.
Rescue efforts were hampered on Saturday after a fire broke out underneath the rubble.
Miami-Dade Mayor Daniella Levine Cava said the blaze was "very deep" and rescuers faced "incredible difficulties" because of the fire.
The building consultant's report from three years ago came to light in a series of documents made public by the town of Surfside.
The engineer, Frank Morabito, said the lack of proper drainage was "a systemic issue" that stemmed from a flaw "in the development of the original contract documents".