A 12-storey residential building north of Miami has collapsed, trapping people inside.

Rescuers are desperately searching for survivors in the rubble.

Here's what we know about what happened.

It happened really quickly

A large section of Champlain Towers, on the seafront in the town of Surfside, crumbled to the ground in the early hours of Thursday.

It took just a few seconds.

People described hearing what sounded like thunder before seeing a huge cloud of dust.

One compared the scene to the 11 September 2001 attacks on the Twin Towers in New York.

Nearly half the building crumbled

The building contained 136 apartments and 55 of them collapsed, leaving piles of debris.

Images taken before and after the collapse show the extent of the damage.

The shattered and compressed layers of the building's collapsed floors can be seen on the ground.

The collapse happened while many were still sleeping.

Residents' furniture and belongings could be seen in what remained of their homes.

image copyrightReutersMany were trapped in the rubble

At least four people have been killed but dozens more are missing.

As families desperately wait for news, search teams have been working around the clock using sonar cameras and specially trained dogs to scour the rubble for survivors.

Dozens have been pulled free.

Teams have also been tunnelling from an underground car park below the building in an effort to reach victims.

But officials say the efforts are dangerous as further rubble could collapse on top of them.

The building 'was sinking'

What caused the 40-year-old building to collapse remains unclear.

But it was undergoing a standard "recertification" process and required repairs, officials said.

Experts who studied the area where the building stood said the land it was built on was sinking during the 1990s.

The study from a researcher at Florida International University found that the area around the building, constructed on reclaimed wetlands, had been sinking at a rate of two millimetres per year for the last three decades.

However, the report's author, Prof Shimon Wdowinski, cautioned that the study was just a snapshot in time and said land subsidence alone was not likely to cause a building's collapse.

By Dominic Bailey, David Brown, Ana Lucía González, Mike Hills, Lucy Rodgers, Joy Roxas and Sean Willmott.