The earthquake struck right at the start of the Muslim Eid al-Adha festival. It lasted for a few minutes ad made buildings rattle and chandeliers fall.
The earthquake was centered in the town of Bala, 80 kilometers (50 miles) south of Ankara . Earlier this day there were minor earthquakes measuring 3.9 and 4.0.
Gov. Kemal Onal said there were no immediate reports of any casualties in the quake.
"Emergency services have left for Bala to assess possible damage in the villages," Onal said.
Earthquakes are frequent in Turkey, much of which lies atop the active North Anatolian fault, though they are rare in the capital.
Two devastating earthquakes killed about 18,000 people in northwestern Turkey in 1999. In 2003, a school dormitory collapsed following a 6.4-magnitude earthquake in Bingol, in southeast Turkey, killing 83 children.