Indonesia’s geophysics agency lifted a tsunami warning 34 minutes after it was first issued following an earthquake that sent 18ft waves crashing into the coast of Sulawesi island, killing hundreds and leaving thousands more homeless.

The 7.5 magnitude quake and tsunami killed at least 384 people in the city of Palu alone when the waves hit the coast.

Hundreds of people were gathered for a beach festival in Palu at dusk.

Many were swept away and remain unaccounted for and the death toll is expected to rise.

The geophysics agency said it followed standard operating procedures and made the call to “end” the warning based on data available from the closest tidal sensor, around 200 km from Palu.

“We have no observation data at Palu. So we had to use the data we had and make a call based on that,” said Rahmat Triyono, head of the earthquakes and tsunami centre at the agency.

He said the closest tide gauge, which measures changes in sea level, only recorded an “insignificant” 6cm wave and did not account for the giant waves near Palu.

“If we had a tide gauge or proper data in Palu, of course it would have been better. This is something we must evaluate for the future,” said Mr Triyono.

A mosque was partially submerged in Palu (EPA)

It is unclear whether the tsunami occurred before or after the warning had been lifted.

“Based on the videos circulating on social media, we estimate the tsunami happened before the warning officially ended,” Mr Triyono said.

The streets of Palu were strewn with debris from collapsed buildings following the tsunami.

A mosque was partially submerged under water and a key bridge had collapsed.

Hundreds were injured and hospitals struggled to cope with patient numbers and with the damage to medical buildings.

More than half of the 560 inmates at a Palu prison escaped after its walls fell, according to the warden, Adhi Yan Ricoh.

A man looks for his belongings amid the debris of his destroyed house in Palu (AFP/Getty)

Rescuers are still struggling to reach Donggala, a city of 300,000 people, which has been cut off by the quake.

Power and telecommunications are down across the region, hampering rescue efforts.

Aid is also yet to reach the town of Mamuju, which has also been severely affected.

Indonesia’s disaster agency spokesman Sutopo Purwo Nugroho said that essential planes could still land at Palu airport but AirNav, which oversees aircraft navigation, said that the runway is cracked and the control tower damaged.

A 21-year-old air traffic controller was killed in the quake after he stayed in the tower to ensure a flight he had just cleared for departure got airborne safely.

Indonesia sits on the Pacific Ring of Fire, an arc of volcanoes and fault lines in the Pacific basin, leaving the country particularly vulnerable to earthquakes.

The most devastating came on Boxing Day in 2004, when a quake triggered a massive tsunami that killed around 226,000 people along the shorelines of the Indian Ocean, including over 126,000 in Indonesia.