A senior Iranian official has warned the Iraqi Kurdistan region that the Islamic Republic would no longer recognize security and military agreements with the region if the Kurds vote to become independent.

Secretary of Iran’s Supreme National Security Council Ali Shamkhani said on Sunday that all security, military and border agreements between Iran and the Kurdish region of Iraq were reached between Tehran the central government in Baghdad.

Should Kurdistan split from Iraq, all the agreements would be annulled, Shamkhani said.

“The Islamic Republic of Iran, as a friend and ally of its Kurdish brothers who has always been alongside them, acknowledges that holding the [upcoming] referendum would not be to the benefit of the Kurdistan region and hence opposes such move,” he said.

The Kurdish referendum is scheduled to be held on September 25, but the central government in Baghdad, as well as neighboring countries have expressed strong opposition to the vote.

Earlier in September, the Iraqi parliament voted to reject the referendum, urging Prime Minister Haider al-Abadi and the central government in Baghdad to “take all steps to protect the unity of Iraq and open a serious dialogue” with Kurdish leaders.