Sharing a mutual enemy can make strange bedfellows — and it appears that the Islamic State may compel Australia to get into bed with Iran. Australian Defense Minister David Johnston has said he would accept the collaboration of Australian special forces with their Iranian counterparts while combating the terror group in Iraq.

"I don't see a problem in that given the nature of the threat," he said in an interview on Sky News Australia when asked whether the 200-strong special forces detachment that Australia was sending to the region could find itself cooperating with Iranian special forces. Iran has committed troops from its elite Quds Force to help advise the Iraqi military in its fight against the Islamic State.

The Australian contingent is due to arrive in the country this week. Although the Australians are also being deployed technically as advisors, the details of their engagement and whether they could be deployed into active conflict zones remains unclear.

Australia's openness to the possibility of working with Iran follows French efforts to reach out to the isolated Islamic Republic. In September the French government seriously considered inviting Iran to a conference of coalition nations planning to strike the Islamic State in Iraq, but the United States government, which is focused on forging a deal with Iran over its nuclear program, objected to the invitation.

After Ayatollah Ali Khamenei, Iran's supreme leader, made much of his claimed rejection of secret American overtures to cooperate against the Islamic State — "I said no because they have dirty hands," he said — the US State Department emphatically stated that Iran and the United States "are not and will not coordinate militarily."

We are not and will not coordinate militarily with Iran. We will be continuing talks on the nuclear issue later this week in NY. — Jen Psaki (@statedeptspox)September 15, 2014

Although Iran has not disclosed the number of its special forces operating in Iraq, it appears that their presence is enough to demand the appearance in Iraq of secretive Quds Force chief Maj. Gen. Qassem Suleimani. Photos published by Iranian state media in recent weeks have depicted him alongside Kurdish forces in Iraq.

In the wake of Defense Minister Johnston's comments, his office was quick to clarify that Iran was a valid partner in the Iraqi government's battle.

"It is a matter of record that Iraq has asked Iran to help them disrupt and degrade ISIL," a spokesperson for the minister said, referring to an alternative name for the Islamic State.

Australia walks a delicate line in legitimizing Iran's intervention in Iraq. It has long condemned similar intervention by Iran on the side of Syrian President Bashar al-Assad's government in his country's long-running civil war.

A security source in the region who spoke with VICE News on condition of anonymity explained that Australia's stance could potentially provoke a wider Sunni insurgency in Iraq.

"By backing the central Iraqi government and Iranian assistance, we would be supporting forces who are against any armed Sunni group," the source said. "We have a situation where people like the Al Anbar tribes are being sidelined."

The Anbar Salvation Council is an anti-Islamist Sunni militia that was formed in 2006 by local tribes and former members of Saddam Hussein's Baath Party. It is widely credited with helping to defeat al Qaeda in Iraq, the predecessor of the Islamic State.

"You could say that a strong reason IS is actually able to reassert itself after the defeat of al Qaeda in Iraq is because the Sunnis feel so disenfranchised and embittered against Shia thuggery, "the source continued. "So by supporting the central government with Iran becoming more intertwined with it, you may actually be complicit with fueling the context that created the problem."

Whether the product of coordination or not, coalition airstrikes have already assisted Iraqi and Kurdish forces that are being advised by Iranian commanders, and the relationship will only become more complicated as units of the Iraqi army and Kurdish peshmerga draw on the resources of both Iranian and Western special forces.

"The latest feeling among the diplomatic corps is that Western intervention will facilitate, and lay the groundwork for, the West eventually removing Assad," the source added. "But looking at the beneficiaries, many of whom are supporters of Assad, that's hard to imagine."

Follow Scott Mitchell on Twitter: __@s_mitchell