According to Islamic law, the victim's family has the right to exercise "retribution" by demanding the death penalty for the perpetrator, but they could also renounce this right.
Najafi's lawyer wants to appeal the verdict.
The high-profile trial of the 67-year-old politician, who serves as economic adviser to President Hassan Rowhani, has dominated public debate in Iran for several weeks.
The details of the case have yet to be confirmed, but the victim allegedly cheated on her husband with a younger man.
Najafi, a reformist, mathematician and professor, served as science and education minister in the past. Until March 2018, he was the mayor of Tehran.
-------------------------------------------------------------------------------------------------------------------------