Supreme leader Ayatollah Ali Khamenei gives sign that new president Hassan Rouhani may hold direct talks with US

Iran's supreme leader, Ayatollah Ali Khamenei, has given the clearest signal yet that the country's newly elected president and moderate cleric, Hassan Rouhani, has the authority to conduct direct talks with the US and offer compromises in nuclear talks.

Khamanei told the Islamic republic's revolutionary guards there was room for leniency in diplomacy. "Diplomacy is the field of smiling and requests for talks," he said on Tuesday in a speech delivered to senior commanders of the elite forces in Tehran, according to his official website.

"I'm not opposed to proper moves in diplomacy, and I still believe in what I named years ago as champion's leniency."

As the supreme leader, the 74-year-old Ayatollah has the final say in all state matters, especially those concerning direct negotiations with the US, which Tehran considers its sworn enemy, and any major agreements about the country's nuclear programme.

In diplomacy, he said, one should have the flexibility of a wrestler: one may at times have to give way for tactical reasons but should never forget who is the "rival and enemy".

By referring to "champion's leniency", Khamenei was invoking the subtitle of a book he has translated from Arabic called Imam Hassan's Peace, which is about how the second Shia imam, Hasan ibn Ali, averted war by showing flexibility and entering an agreement with his enemy 14 centuries ago.

Khamenei was speaking a few days after it emerged that the US president, Barack Obama, had exchanged letters with Rouhani raising chances of a historic meeting between the two men at the UN general assembly next week and possible high-level meetings between Tehran and Washington in future.

Iran's foreign ministry spokeswoman, Marzieh Afkham, confirmed on Tuesday that letters had been exchanged, saying Obama had written to Rouhani congratulating him on his election victory, and Rouhani had responded.

Seyed Hossein Mousavian, a former Iranian nuclear official who worked as Rouhani's deputy in Iran's supreme national security council from 1997 to 2005, wrote in an article last week that Khamenei has given consent for direct talks with the Obama administration.

"Iranian Supreme Leader Ayatollah Ali Khamenei has issued permission for President Hassan Rouhani's new administration to enter into direct talks with the US," he wrote in the Japan Times. "No better opportunity to end decades of bilateral hostility is likely to come along."

Khamenei told the guards, who are accused by the west of largely supporting Bashar al-Assad's regime in Syria both militarily and financially, that they should stay away from politics. "It is not necessary for the guards to have activities in the political field," he said, echoing Ayatollah Rouhollah Khomeini, the late founder of the Islamic republic, who banned the elite forces from involvement in politics after the 1979 Islamic revolution.

Despite this, the guards have been extensively involved in Iranian politics recently, especially under the eight-year rule of the former president, Mahmoud Ahmadinajd, during which time they expanded their political and financial operations.

Khamenei's words echoed those of Rouhani on Monday, when he asked the guards to "stay above and beyond political currents", and warned them against competing with the will of the people.

Khamenei's warning came as new video footage allegedly showing Iranian guards in Syria aiding the Assad forces was released by a Dutch television programme.

It was unclear whether Khamenei was attempting to curb the guards' power, fearing it may have got out of hand, or whether he was asking them not to cause difficulties for Rouhani's administration, should it choose to compromise over Tehran's nuclear dossier.

Khamenei reiterated that Iran was not seeking to make an atomic bomb. "We are against nuclear weapons, not because of the US or other countries, but because of our beliefs," he said. "And when we say no one should have nuclear weapons, we definitely do not pursue it ourselves either."

Iran's former foreign minister Ali Akbar Salehi, who has been reinstated as the head of the country's atomic energy agency by Rouhani, said at the International Atomic Energy Agency (IAEA) in Vienna this week that Tehran was ready to "end the so-called nuclear file".

Iran's nuclear dossier, previously under the control of hardliners, has been transferred to the foreign ministry at the request of Rouhani.

Iran's foreign minister, Mohammad Javad Zarif, who is travelling to New York with Rouhani, is scheduled to meet the EU's foreign policy chief, Catherine Ashton, and the British foreign secretary, William Hague, but it is unclear when and where the new round of nuclear talks will be held.