The 7.7-magnitude quake caused widespread damage in a country already in chaos because of civil war.