Fire brigade officials said there were no immediate reports of damage or injuries.
The earthquake at 2024 GMT was felt in central Athens and the suburbs. Witnesses said it set off car alarms.
Gerassimos Papadopoulos, researcher with the Athens Geodynamics institute told state TV ERT the epicentre was near Marathon, in southeastern Attica. The depth, he said, was between five and 10 km.
The region has been active in recent days and the latest earthquake seems to be the peak of this activity, Mr Papadopoulos said without ruling out the possibility of another earthquake.
“Residents should remain calm,” he said. “The data is in our favour.”
Greece is prone to earthquakes. Most cause no serious damage, but a 5.9-magnitude quake near Athens in 1999 killed 143 people.
The quake came as protesters clashed with police outside Greece’s parliament over the government’s plans to implement further austerity measures and restrictions on workers’ right to strike.