The quake happened on Wednesday at 23:27 local time (1957 GMT) at a depth of seven kilometers on the border of Tehran and Alborz provinces.
There has been no serious casualties or damages so far.
The quake was also felt in the cities of Karaj, Qom, Qazvin and Arak.
5.2-Magnitude Quake Jolts Tehran Province
People in Tehran and Alborz provinces have taken to streets after a magnitude 5.2 earthquake hit Malard, a few kilometres from the Iranian capital.