Iran's state TV is reporting officials have released two Azerbaijan citizens in prison since May on charges of spying.
The Tuesday report quotes the spokesman of Iran's Foreign Ministry, Ramin Mehmanparast, as saying Iran released the two on Tuesday, based on Islamic mercy.
The release coincides with a visit to Baku, Azerbaijan's capital, by the Iranian vice president in charge of cultural heritage, Hasan Mousavi.
Iran said in July it arrested Shahryar Hajizadeh and Farid Husseinov over alleged their links to Azerbaijan's secret service and plans to recruit Iranian dissidents.
The decision comes after months of bitter exchanges between Iran and Azerbaijan. Iran accuses Azerbaijan of harboring anti-Iranian terrorists linked to Israel's Mossad. Azerbaijan says Iran supports Islamist dissidents.
Each country denies the other's charges.