The Indonesian authorities said a resident was reported to have died from a heart attack during the quake.
The strong tremors could be felt for eight to 10 seconds in most districts and towns of Aceh, causing residents to panic and dash out of their homes to save their lives.
The quake’s epicentre on land is at a depth of 10km, and 16km southwest of the main Aceh district and 32km southeast of Banda Aceh.
According to the Indonesia National Disaster Management Body (BNPB), three small districts – namely Tangse, Mane and Geumpang in Pidie – were badly affected by the earthquake.
In Tangse, a resident died from a heart attack during the incident and three others were injured while the buildings damaged include 368 houses, nine mosques, 13 schools and three government offices, besides two bridges.
The authorities have sent rescue and relief mission teams to the affected areas.