A secret letter sent by Barack Obama to Iran’s religious and political leader suggested that diplomacy between the two adversaries over the nuclear issue might presage a broader rapprochement, despite the Obama administration’s denials.

The letter, penned in October and sent to Ayatollah Ali Khamenei, reportedly referenced a shared interest between the US and Iran in combatting Islamic State (Isis) militants in Iraq and Syria.

White House officials did not dispute the authenticity of the letter, reported by the Wall Street Journal on Thursday, but would not discuss its contents.

Cementing an agreement with Iran to prevent it from building a nuclear weapon is the Obama administration’s highest diplomatic priority. It faces enormous opposition in Congress, where legislators of both parties consider the outreach to be a naive folly – opposition that may prove fatal now that both legislative chambers are controlled by the Republican party.

But the administration has repeatedly stated that the nuclear talks, the first sustained and overt diplomacy between Washington and Tehran since the 1979 Islamic revolution, are a discrete endeavor that do not necessarily herald a wholesale thaw in the relationship.

Reports of the latest Obama letter to Khamenei, suggested a deeper collaboration could occur should nuclear talks bear fruit. Photograph: Jacquelyn Martin/AP

Despite that assurance, the US and Iran are substantively aligned against Isis, both backing a new Shia-led government in Baghdad against a mutual foe. Deep scepticism in Washington exists about a thaw in relations, as the US and Iran compete for influence in the Middle East and South Asia. Opposition to an Obama deal with Iran has united Israel with the Gulf Arab states, all of whom consider Tehran an implacable foe.

The US military, which holds Iran responsible for an influx of deadly homemade bombs known as explosively formed penetrators during the 2003-2011 Iraq war, insists it has no coordination with Iranian units assisting Iraqi ground forces and militias. An influential and shadowy Iranian general, Qassem Soleimani, has permitted himself to be photographed throughout Iraq, bolstering his regional prestige as a power broker.

In an interview with National Public Radio in June, General Martin Dempsey, the chairman of the joint chiefs of staff, said it was not “entirely impossible that we would at any point act collaboratively with Iran,” and recognised that the US and Iran had “potentially the same goal” in Iraq. Yet formal collaboration appears not to have manifested, with both sides for now being said to prefer non-aggression against one another.

Reports of the latest Obama letter to Khamenei, believed to be the fourth the president has written to his Iranian counterpart, suggested that a deeper collaboration could occur should nuclear talks bear fruit.

The parties to the nuclear discussions have until 24 November to reach a deal. John Kerry, the US secretary of state, will meet with his Iranian counterpart Javad Zarif and Catherine Ashton, the senior European Union representative at the talks in Oman at the weekend.

“I want to get this done,” Kerry said on Wednesday in Paris, who denied that the new Republican Congress will make a deal more elusive.

An Iranian woman pays a 20000 rial banknote bearing a portrait of Iran’s late founder of islamic Republic Ayatollah Ruhollah Khomeini. Photograph: Atta Kenar/AFP /Getty Images

Congressional opposition to a deal ran white-hot even before the Republicans prevailed in Tuesday’s midterm elections. The incoming chairman of the Senate foreign relations committee, Bob Corker of Tennessee, signaled in June that he would back new economic sanctions on Iran should a deal not be reached.

Ahead of the Republican takeover of Capitol Hill, the White House was reportedly considering ways to cement a deal with Iran that would not be contingent on congressional assent. Yet Iran wants a deal to end the US-led sanctions regime, which Congress would have to repeal for the sanctions to permanently expire. It remains to be seen if Iran can live with a sanctions regime that a US president declines to enforce.

The White House appeared to acknowledge the existence of the letter in answering criticism that it made it look like it was more willing to talk to the Ayatollah than Congress.

“I recognise it may sound that way but the fact of the matter is there are also secret conversations between the administration and Congress,” said spokesman Josh Earnest. “We have been reading them in as we have been trying to negotiate this deal.”

Earlier Earnest refused to comment on “private correspondence” but he stressed that the “policy that the president has articulated about Iran remains unchanged”.

Nevertheless reports that the letter made US cooperation over Isis “contingent” on nuclear progress do suggest a departure from stated administration policy that the two issues are separate.

The White House has previously acknowledged only talking to Iran about Isis on the sidelines of international nuclear talks, something its spokesman re-iterated on Thursday.

“The US will not cooperate militarily with Iran but their interest in this has been discussed on the sidelines of other communications,” said Earnest.