People were sleeping when a strong earthquake hit northern Afghanistan at about 1 a.m. on Monday.
The quake measured 6.3 in magnitude and its center was close to the busy city of Mazar-i-Sharif.
Walls shook and families ran outside in the dark, afraid that their homes would fall.
The beautiful Blue Mosque in Mazar-i-Sharif lost parts of its base, and broken stones covered the ground.
The mosque is very important for many Muslims, who believe it is the resting place of Hazrat Ali.
Officials say at least 20 people died and more than 860 were injured.
A video showed soldiers pulling a young girl alive from the rubble during search and rescue work.
Doctors warn that the number of victims may rise because many villages are hard to reach.
Electricity lines from Uzbekistan and Tajikistan broke, leaving people in nine provinces without power.
The quake also filled the Tashqurghan passage with rocks, but the army soon cleared the road.
The United Nations sent teams to check what people need and to bring urgent aid.
India quickly gave medical supplies, and the group Save the Children warned that the quake might harm children’s mental health.
Afghanistan has felt several deadly earthquakes in recent years.
In August a 6.0 quake in the east killed about 2,200 people, and in October 2023 another 6.3 quake in the west took more than 2,000 lives.