Dubai: In a rare outreach to Iran’s Supreme Leader Ayatollah Ali Khamenei, President Barack Obama wrote a letter to him in the middle of last month about the fight against Daesh militants, a common enemy in Syria and Iraq, according to the news reports.

Obama stressed the two nations’ common interests in fighting the militant group, writing that such cooperation depends on reaching a nuclear accord, an officials told Bloomberg on condition or anonymity.

One of the officials told Bloomberg that the letter seeks to discourage Iran’s leader from concluding that his cooperation in the fight against Daesg would give Iran leverage to demand concessions from the US and its partners in negotiations over restricting Iran’s nuclear programs.

The October letter marked at least the fourth time Obama has written Iran’s leader since taking office in 2009.

The Wall Street Journal (WSJ), which first reported that Obama had sent the letter, noted that “the correspondence underscores that Obama views Iran as important—whether in a potentially constructive or negative role—to his emerging military and diplomatic campaign to push [Daesh] from the territories it has gained over the past six months.”

The letter was also meant to reassure Iran that it’s operations in Syria were not targeted at Iran’s embattled ally Bashar Al Assad, a person briefed on the letter told the WSJ. “It states that the US’s military operations inside Syria aren’t targeted at Al Assad or his security forces,” it reported.

The US and Iran are each engaged in military efforts to degrade the Daesh group, essentially putting the longtime foes on the same side in the campaign against the extremists. However, the Obama administration has repeatedly insisted that it is not coordinating and will not coordinate its military actions with Iran, though officials from both countries have discussed the matter more broadly.

Obama’s letter to Iran’s powerful religious leader comes against the backdrop of the looming November 24 deadline in nuclear negotiations between the US and Iran, as well as five other world powers.

While not confirming or denying the existence of the letter, administration officials said there were still no plans to cooperate or coordinate with Iran against the militants.

“The United States will not cooperate militarily with Iran in that effort,” White House spokesman Josh Earnest said. “We won’t share intelligence with them.”

Diplomatic sources separately confirmed the existence of the letter to The Associated Press. They did so only on the condition of anonymity to publicly discuss Obama’s outreach.

Obama authorised a US-led air campaign against Daesh fighters in Iraq in August and expanded the mission the following month to neighboring Syria. The US is taking action alongside several other nations, including a handful of regional partners.

Iran is not part of the US coalition, but it has also been fighting Daesh on the ground. However, Iran’s interests in pursuing Daesh’s defeat differ from those of the Obama administration. Iran is a staunch supporter of Syrian President Bashar Al Assad, who is a target of the militants and opposed by the US

Two chief critics of Obama’s foreign policy, Republican Senators John McCain of Arizona and Lindsey Graham of South Carolina, called it “outrageous” that Obama would seek to enlist Iran in its fight against Daesh given Iran’s support for Al Assad and Shiite extremists throughout the region.

“The consequences of this ill-conceived bargain would destroy the Syrians’ last, best chance to live in freedom from the brutal Al Assad regime,” the two senators said in a joint statement.

US officials have not ruled out the possibility that a nuclear accord with Iran could open the door to discussions on other issues, but they have sought to keep the delicate negotiations focused solely on Tehran’s disputed nuclear program. The US and its negotiating partners say Iran is pursuing a bomb, while Iran says its nuclear program is for peaceful purposes.

The prospects for a final agreement remain uncertain, with Obama saying on Wednesday that the ability to secure a deal is an “open question.”