Spain’s largest earthquake in 50 years has hit the town of Lorca, killing nine people and forcing thousands to sleep outdoors.