Obama Khamenei
US President Barack Obama sent a secret correspondence to Iran's religious leader on subjects such as the Islamic State and Iran's nuclear program.Reuters

US President Barack Obama secretly wrote a letter to Iran's Supreme Leader Ayatollah Ali Khamenei last month to speak of the two nations' shared interests in battling the Islamic State [Isis].

He told Khamenei that any cooperation between the US and Iran against IS was dependent on a deal between Iran and global powers on the future of the nuclear program by a 24 November deadline.

White House press secretary Josh Earnest would not confirm or deny that the letter had been sent to Iran's top political and religious leader.

"I'm not in a position to discuss private correspondence between the president and any world leader," Earnest said.

Obama and senior US officials believe that the prospect of a deal with Iran stands at 50-50 with Secretary of State John Kerry to begin direct negotiations with Iranian Foreign Minister Javad Zarif in Oman this weekend.

"There's a sizable portion of the political elite that cut their teeth on anti-Americanism," Obama said this week in regard to the Iranian elite. "Whether they can manage to say 'Yes'...is an open question."

The Wall Street Journal reported that the White House kept the private correspondence with Iran secret from allies in the Middle East such as Israel, Saudi Arabia and the United Arab Emirates.

"We've passed on messages to the Iranians through the Iraqi government and Sistani saying our objective is against Isil [another name used for IS]," a senior U.S. official told the newspaper.

"We're not using this as a platform to reoccupy Iraq or to undermine Iran."

The letter represents the fourth time that Obama has written to Iran's religious leader since entering the White House in 2009.