An earthquake, measuring 5.9 on the Richter scale, struck the city on Wednesday afternoon.