The word "adviser" sounds quite benign. You imagine a sensibly suited person with maybe a row of pens in an upper shirt pocket. What probably does not come to mind is a highly trained, heavily armed soldier with the ability to call in multi-million-dollar missile strikes with the flick of a radio switch‎.

US President Barack Obama has approved sending 1,500 more troops to Iraq in advisory and training capacities. That will bring the number of US troops in this country to just over the 3,000 mark.

Of course this all has to be rubber-stamped by Congress and the majority of the politicians who are now Republican may want to extract concessions from the president before they approve anything.

Here in Iraq, the deployments are being seen in two ways.

Officially, they welcome the help and say it is crucial in turning the tide against ISIL.

But unofficially, people in defence and security establishments are worried that it represents a scaling up of America's commitment and that reminds some of the days of the US occupation of Iraq.

Shia leaders have been particularly outspoken, saying that they are capable of defeating ISIL without US boots on the ground.

A commander for the Badr Brigade, now called a Peace Platoon Unit, told Al Jazeera that they were able to take the southern town of Jurf Al Sakhar back from ISIL without US help. "We did not need their airstrikes, we did not need their help. We cleared this area quickly and without fuss," he said.

But the Badr Brigade commander did get outside help.

Iranian influence

Iran has been quietly sending in troops and equipment into Iraq, they have been arming and supporting Iraqi army and Shia militia operations ‎in Diyala province and in the south of country.

The fearsome Iranian Al-Quds force has been behind much of this strategy, and the head of Al-Quds force, General Qassem Soliemani, has been pictured in Iraq alongside Iraqi and Kurdish forces. The other key tactician seems to be a man called Ali Shamkhani, the head of Iran's Supreme National Security Council.

With both Iran and the US ‎vying for influence in Iraq, distinct roles have developed. US security forces are being deployed at brigade level into Iraq. They are not at the front and are not fighting.

Their key roles include defensive and offensive planning in co-ordination with Iraq troops. In effect, US troops will be at bases with Iraqi commanders and will help plan the Iraqi army strategy. They will not pull the trigger but they will help point the gun.

The Iranian role is much more at the sharp end of the fighting. Iranian troops are embedded with fighting forces, both regular Iraqi army and Shia militias. Iranian commanders are leading from the front and are seen regularly on the ground.

Former US brigade general Mark Kimmit travels regularly to Baghdad and told me: "There is a key distinction between the US and Iran. The Iranians work with the militias and the US only works with units under the control of Baghdad and Erbil."

That distinction is crucial as it allows both countries to follow their agendas without overlap, and given the historical animosity between the two that is useful.

Radically different agendas

So far, both the US and Iran share the same goal in Iraq, the defeat of ISIL. In Syria, however, things get murky. Iran is committed to the survival ‎of president Bashar al-Assad's regime and the US government is not.

Iraq then becomes a petri dish of sorts for an experiment on the use of force and diplomacy ‎between rivals who are also in intense negotiations over Iran's nuclear programme.

So far, the negotiations over the nuclear programme and Iran's role in Iraq have been quite separate according to publicly available information. However, as one Western diplomatic source put it to me, there is a concern.

"In Washington some are concerned that the more troops America puts into Iraq, the more vulnerable it becomes," they say.

"Say, the Iranians and the West fail to get a nuclear deal, then you are in a situation where you have American and coalition forces working with Iraqi forces who are working with Iranian forces.

"How does that play out? If I was Iran I would want to make life very difficult for American and coalition forces."

Both the US and Iran are upping the ante when it comes to confronting ISIL.

Troop levels are increasing, equipment and money is pouring in. Both have agendas that meet, but both have long-term goals that are radically different.

The war against ISIL will not end anytime soon, but the question many here in Iraq are asking, with two sworn enemies working along side each other, what happens when one side wants something the other side does not want to give?

Follow Imran khan on Twitter @ajimran