The purpose of the suit, filed in Miami-Dade County just before 11:30 p.m. Thursday, is to “compensate the victims of this unfathomable loss,” according to the filing.

A resident of Champlain Towers South, the Florida high-rise condo building that partially collapsed, filed a class-action lawsuit less than 24 hours after nearly half the building was reduced to rubble.

The suit, filed by Manuel Drezner in Miami-Dade County just before 11:30 p.m. Thursday, said its purpose is to “compensate the victims of this unfathomable loss.”

Part of the 12-story building in Surfside, near Miami Beach, collapsed about 1:30 a.m. Thursday. Of the building’s 136 units, 55 in the northeast corridor were gone in a matter of seconds.

As of Friday morning, four people were dead and 11 had been hurt, officials said.

A staggering 159 people were unaccounted for, while 120 people from the building were accounted for, Miami-Dade County Mayor Daniella Levine Cava told reporters Friday morning.

The suit said Champlain Towers South Condominium Association Inc. “failed to adequately secure the building, placing the lives and property of its occupants and visitors … at risk resulting in the collapse of the building.”

“At all relevant times, defendant was aware, or reasonably should have been aware that the plaintiff’s and the class’s lives and property were at risk due to the lack of precautions taken at Champlain Towers South,” according to the suit.

Officials have not yet determined the cause of the collapse. The lawsuit said the defendants reserve the right to amend the filing as more information and potential victims become known.

An agreement attached to the suit between Champlain Towers South Condominium Association Inc. and condominium owners said “the association shall maintain, repair and replace at the association’s own expense … all portions of the units … contributing to the support of the building, which portions should include but not limited to, the outside of the building and load bearing columns.”

The suit said the agreement was clearly breached by Champlain Towers South Condominium Association Inc.