The earthquake struck just before midnight, shaking buildings from Kabul to Pakistan’s capital Islamabad, around 370 kilometres away.