The quake struck at 8.36pm, it's epicentre being the town of Arenas del Rey in Andalusia's Granada province.
It was also felt in Jaén and Malaga provinces.
Emergency services said they received numerous calls in the wake of the eathquake but there were no reports of injuries or damage.
Experts said the depth of the quake — it took place 62 kilometres (38 miles) below ground — was responsible for that lack of damage or injuries.
Wednesday's quake was the second incident to make the news in Spain in recent days.
On Tuesday, a small earthquake shook Catalonia's Lleida province with some locals saying a meteorite may have been responsible after they reported seeing bright lights in the sky moments before the quake.