A handout picture made available by Iran's supreme leader official website shows Ayatollah Ali Khamenei during a graduation ceremony of naval cadets in the city of Noshahr, northern Iran, 30 September 2015. (Supreme Leader Official Website via EPA)

Just months after the historic nuclear deal reached between Iran and the United States, Iran's Supreme Leader Ayatollah Ali Khamenei announced a ban on any further negotiations between the two countries.

Khamenei's ruling conflicts with that of the Iranian President, Hassan Rouhani, who last month expressed openness to discussions with the US on the war in Syria.

The ruler made the announcement Wednesday in a meeting with the Islamic Revolution Guards Corps (IRGC) Navy, according to his website. He warned those gathered that "The enemies are trying to change [our] officials' calculations and influence the thoughts of people, particularly youths, and everyone should be vigilant and conscious [to prevent this]."

Khamenei said that during the nuclear negotiations, US representatives had tried to use the talks to initiate "infiltration" in Iran, and though Iranian negotiators were aware of what their American counterparts were up to, the US "finally got the chance in some instances."

"Negotiation with America is banned because such negotiation will not only have no advantage [for Iran], but will also entail numerous disadvantages," he said, according to the website.

Khamenei had supported the country's negotiations with the US over its nuclear activities, in which the US agreed to lift economic sanctions against Iran in exchange for Iran curtailing its nuclear productivity and allowing inspectors onto nuclear sites.

"Negotiations with the United States open gates to their economic, cultural, political and security influence. Even during the nuclear negotiations they tried to harm our national interests.," Khamenei said.

The timing of Khamenei's announcement is significant, as Reuters reports that Iranian troops have been dispatched to help Russian forces in Syria, a longtime ally of Iran. The alliance is purportedly to rout out the Islamic State in Syria, though Russia has also been striking other rebel groups, including those backed by the US.

Rouhani said last month that Iran was willing to discuss military strategies with the US to oppose the Islamic State in Syria, but said it would not debate Assad's future until peace was achieved.

Reuters contributed to this report.