KHANAQIN, Iraq (Reuters) - In a lively market town hotly disputed between Iraqi Kurds and Baghdad's Arab-led government, Khalil Ibrahim points at the ground under his feet to illustrate what he thinks the dispute is about: oil.
"Baghdad wants the oil here -- we're probably standing on some of it right now -- and that's the real reason they won't let us Kurds rule ourselves," said the retired Kurdish soldier, 58, before crossing the road to a gaudy ice cream bar in majority Kurdish Khanaqin, on the edge of Iraq's violent Diyala province.
Along a fuzzy seam dividing central Iraq from the largely autonomous enclave of Kurdistan, a row is bubbling over which authority owns this patchwork of Kurd and Arab neighbourhoods, river-fed palm groves and multi-billion-barrel oil fields.
Iraqi Kurdistan is believed to have up to 45 billion of Iraq's 118 billion barrels of oil reserves. If all disputed areas were included in the Kurdish region, its share might go up to 65 billion barrels, Kurdish officials say.
Nowhere has the row come closer to violence than Khanaqin, near the Iranian border, where local commanders had to defuse a standoff between the Iraqi army and Kurdish Peshmerga forces last August to prevent it degenerating into a shootout.
Yet a breakthrough this month on a parallel dispute over oil exports from Kurdistan -- which officially began this week despite Baghdad's rejection of contracts the Kurds have signed with oil firms -- has raised hope the disagreements are not so intractable.
The stakes are high. Officials and analysts see the dispute as the biggest long-term threat to stability as U.S. troops prepare to end combat operations by the end of Aug 31. 2010, under orders from President Barack Obama.
"They will come to a stage when the Americans withdraw where a choice has to be made: fight or pursue peace," said Joost Hiltermann, International Crisis Group Middle East director.
"It's going to be very difficult to prevent a fight. Once you take the American forces out, without having settled the major disputes, it's going to fall apart."
The struggle over land, oil and power has left much foreign investment in northern Iraq's oil sector in limbo.
Kurdish officials last month heralded an $8 billion plan to export natural gas via the Nabucco pipeline to Europe, keen to free itself of dependence on Russia. Baghdad rejected the deal.
Fields in the disputed areas are among those on offer by the Oil Ministry in bidding rounds, but the Kurds warn they might reject and block any deals on which they are not consulted.
In the desert area around Khanaqin, which has several oil wells none of which are yet producing, the dispute has also compounded the problem of a still-active Sunni Arab insurgency.
Al Qaeda and other militants exploit tensions between Peshmerga and Iraqi forces by hiding in 'no man's land' areas the two sides avoid to avert clashes. Diyala and Nineveh, another mixed Arab-Kurd province, are Iraq's most violent areas.
Yet for all its potential to flare up, it hasn't. Since the Khanaqin standoff, the two sides have come no closer to a fight.
"The commanders have shown an ability to resolve conflicts ... before it comes to shots being fired," said Captain Gabe Austin, whose troops patrol an area including Khanaqin.
Last month, the Iraqi Army and Kurdish Peshmerga troops started joint patrols in disputed parts of Diyala, searching houses for weapons and detaining suspected militants. They say they have so far arrested over 300 people in that operation.
On one such patrol, Reuters accompanied them as they scoured a clay-walled village alongside the Diyala river, whose waters feed an oasis of green date palms and wheat fields ringed by rocky desert.
"I'm pretty surprised to see them working together," said Flozia Mohammed Ali, 50, a Kurd, as soldiers turned out her cupboards. "It's good, but I'm not sure they really mean it."
Baghdad and the KRG recently put aside differences to export crude from Kurdistan's Tawke field, run by Norway's DNO International, and Taq Taq, developed by Addax Petroleum. Turkish firm Genel Enerji is involved in both.
Urgent need for cash brought them together, analysts say, but it will take more to dispel the underlying rancour.
Saddam Hussein expelled thousands of Kurds and Turkmen from Kirkuk and towns like Khanaqin in the 1970s to secure the energy reserves, and used poison gas to murder thousands of them.
"Saddam brought Arabs to displace us and seize this place. Why should we trust any government in Baghdad after that?" said Mohammed Gulam, a taxi driver, as he played a vigorous game of dominoes with friends, all Kurdish, in a Khanaqin tea house.
A referendum on the status of the disputed territories agreed in Iraq's constitution has been held up. Arab and Turkmen minorities accuse Kurds of moving in en masse to tip any result.
In April, the U.N. handed Iraq a report on the disputed territories that it hopes will help ease tensions, but neither side has discussed it publicly.
An official at the mayor's office in Khanaqin, Atif Adil Jassim, wants Baghdad to act quicker to hold the referendum.
"If they wanted to they could solve this problem: follow the constitution and respect the people's will," he said.
The government denies it is trying to delay the vote.
"All parties agreed we need more time," said government spokesman Ali al-Dabbagh.
"We have not been able to conduct a referendum across Iraq because of the security situation ... wrangling between parties in the city (of Kirkuk) have forced all parties to review this."
Meanwhile, investors in northern Iraq's oil reserves seem unfazed. Besides DNO and Addax, British explorer Heritage Oil, says it has found 4.2 billion barrels in Kurdistan.
"The civil war scenario ... would be a disaster for those companies. They must be banking this is all going to be worked out," said John Hamilton, an analyst at the Gulf States Newsletter. "I think that's a reasonable thing to expect."
Additional reporting by Mohammed Abbas in Baghdad; Editing by Michael Christie and Sara Ledwith