The earthquake, registered at 5.1 magnitude, knocked out telecoms and power in parts of the city.