By Jim Muir
BBC News, Baghdad
Turkey is deploying troops near its border with Iraq
The current crisis on the Turkish-Iraqi border comes against the background of a long and complicated relationship between Ankara and the Iraqi Kurdish region in northern Iraq.
Several times in the 1990s, Iraqi Kurdish peshmerga fighters fought alongside the Turkish army inside northern Iraq, to try to dislodge militants of the Turkish rebel Kurdistan Workers' Party (PKK) from the rugged and remote border mountains where they were dug in.
But now the signs are that a major Turkish land incursion, if it went beyond the border mountains, would likely collide with Iraqi Kurdish forces, anxious to defend the autonomous region of Iraqi Kurdistan where they have been running their own affairs since the early 1990s.
Tensions between Turkey and the Iraqi Kurdish region had been rising steadily in the months running up to the current crisis, triggered by PKK attacks which have killed some 40 Turkish troops in recent weeks.
In May, Turkey was angered when the three provinces of Iraqi Kurdistan were handed security control by the US-led multinational forces, and promptly raised the Kurdish flag instead of the Iraqi one.
Turkish sensitivities have been further aggravated by the approach of the deadline for a referendum in the oil-rich Kirkuk province - currently outside Iraqi Kurdistan - on whether it wants to join the three Kurdish-majority provinces currently making up the autonomous Kurdish region.
Under the new Iraqi constitution, the referendum was supposed to be held by the end of this year, but will quietly slide as the necessary preparations, such as a census, have yet to be carried out.
Formed in late 1970s
Launched armed struggle in 1984
Dropped independence demands in 1990s
Wants greater autonomy for Turkey's Kurds
Leader Abdullah Ocalan arrested in 1999
Ended five-year ceasefire in 2004
Called a terrorist organisation by Turkey, the EU and US
The Turks fear the acquisition of the Kirkuk fields will bolster de facto Iraqi Kurdish independence.
So it is hardly surprising that the massing of Turkish armour and troops on the border is now being seen by Iraqi Kurds as heralding a blow to their autonomy under the cover of an attack on the PKK.
Many believe that two PKK raids, which killed 25 Turkish soldiers and led to the current crisis, were stage-managed by the Turks to provide the pretext for an incursion.
One Iraqi Kurdish leader quoted a PKK source as saying: "We didn't mount raids on them, they attacked us and we just defended ourselves."
"Tanks are useless in the kind of mountainous terrain where the PKK are operating," said one senior Kurdish source.
"And you don't need 100,000 troops to take their positions. What they're clearly planning to do is to stage a major incursion and take control of the major land routes inside Iraqi Kurdistan leading up into the border mountains from the Iraqi side."
Such an invasion would carry a clear risk of collision with the Iraqi Kurdish forces.
Sources in both the major factions, the Kurdistan Democratic Party (KDP) of Masoud Barzani, and the Patriotic Union of Kurdistan (PUK), headed by the Iraqi President, Jalal Talabani, said their troops were preparing for a confrontation, while trying to avoid one.
There is speculation in Kurdish circles that the Turks might also try to bomb or otherwise neutralise the two Iraqi Kurdish airports, at Irbil and Sulaymaniyah, which Ankara asserts have been allowing PKK fighters to move in and out of the area.
The airports are also seen as proud symbols of Iraqi Kurdish autonomy.
The scale of the Turkish mobilisation on the border is one factor that has persuaded Baghdad and the Iraqi Kurds that the Turkish agenda goes beyond simply dealing with the PKK.
"There are no Iraqi or Kurdish forces between the Turkish army and the PKK fighters - they are in direct contact," said Iraqi Foreign Minister Hoshyar Zebari in a BBC interview.
"The Turks could wipe them out or bomb them as they have done in the past. What they are proposing is something larger than that.
"They are talking about a large-scale military incursion, which is getting people extremely, extremely nervous and worried."
"The concern of many people is that Turkish ambition may stretch beyond taking out the PKK."
Another factor that has convinced Baghdad and the Iraqi Kurds that Turkey is implacably bent on a major incursion is the frosty reception given to the high-ranking Iraqi government delegation that flew to Ankara for crisis talks at the end of last week.
They were received in a manner that in protocol terms was diplomatically insulting.
More than that, the Turkish side received the Iraqi proposals impassively, did not discuss them, and did not present any suggestions of their own, according to senior Iraqi officials.
Turkey has watched the development of Iraqi Kurdish autonomy with misgivings, anxiety and ill-concealed hostility.
But at the same time Turkish companies have been profitably involved in the economic and construction boom and oil developments in Iraqi Kurdistan.
Turkish public opinion has reacted furiously against the PKK
This factor may militate against a major intervention, but also might not be strong enough to withstand the tide of Turkish public demand for action.
Will Turkey go ahead with a major incursion, and how deep and far will it go?
The answer will emerge from the complex and unpredictable interaction between various elements.
Inside Turkey, there is the fury currently ruling public opinion and the uneasy relationship between its powerful military and its civilian government.
Other factors that will influence the outcome include the troubled state of affairs between Ankara and Washington, America's dilemma - caught in the crossfire between two allies - and the Iraqi Kurds' own ambivalent ties with Baghdad.
Iraq and its Kurds are hoping the situation on the ground will remain calm, and that international diplomatic pressures will defuse the crisis.
A big conference of Iraq's neighbours and major international players in Istanbul on 2-3 November, along with Turkish Prime Minister Recep Tayyip Erdogan's visit to Washington on 5 November could improve the situation.
The least they can hope for at present is that the Turks will focus any action strictly on the PKK in the border mountains.