Video that emerged later of her smiling husband parading her decapitated head in the street sparked an outpouring of grief and outrage in the Islamic republic.
Sajjad Heidarnava was sentenced to seven and a half years in prison for murder and eight months for assault, judiciary spokesman Massoud Setayeshi told reporters.
The family of Heidari had pardoned the killer rather than demanding qesas -- Iran's Islamic law of retribution.
"The accused has no right to protest against the verdict and the decision is final," the spokesman said.
"The second defendant in the case, Heidar Heidarnava, was sentenced to 45 months in prison for complicity in intentional homicide," he added.
At the time of the murder, media outlets in Iran said Heidari had been married at the age of 12 and was the mother of a three-year-old son when she was killed.
After the crime, human rights defenders called for changes to the law to protect of women against domestic violence and to increase the minimum age of marriage for girls, currently set at 13.
Iran has been rocked by protests that erupted after the September 16 death of Mahsa Amini, a 22-year-old Iranian Kurd, after her arrest for an alleged breach of the country's dress code for women.