The tremor struck at a depth of 11 kilometres near the district headquarters, with no immediate reports of damage or casualties.
Residents fled shaking buildings in Panama City as a second strong aftershock followed the main quake off the southern coast.
A 4.9‑magnitude quake struck deep in northern Afghanistan at 1:57 am IST, sending light tremors into Kashmir but causing no casualties or damage.
A rapid succession of tremors began just after midnight, shaking major cities including Dhaka and Chattogram but leaving no reports of serious damage.
The German Research Centre for Geosciences reported the quake, which struck a highly active seismic zone near Sumba and Lombok.
The early-morning quake near Korumburra was felt by thousands of residents and followed by dozens of aftershocks.