BAGHDAD - The decisive battle of the Iraq war is shaping up -- not in the streets of Baghdad but in the halls of government where the future of America's role across the region is on the line.
American and Iraqi officials have expressed new resolve to hammer out far-reaching deals that would allow U.S. forces to remain on bases across Iraq once the United Nations mandate expires at year's end.
The stakes in the talks are enormous.
The outcome will shape not just Iraq for years to come -- but, more important, America's strategic position all across the oil-rich Persian Gulf at a time when Iran's influence is growing. The U.S. maintains substantial air and naval forces elsewhere in the Gulf but few ground troops except in Iraq.
A pact also would assure Arab allies that Iraq would not fall under domination by Iran, which is pressuring the Iraqis to refuse any deal that keeps U.S. soldiers here.
But critics in the United States fear it will tie the hands of the next president when millions of Americans are anxious to bring troops home. Many Iraqis, in turn, worry the deal will allow American domination of their country for decades.
With so much in the balance, the Iraqi government said this week that both Washington and Baghdad recognize the need to finish the talks by July's end "to avoid any legal vacuum that may arise.''
That came only days after it seemed the deal was dead. But Foreign Minister Hoshyar Zebari said the prospects for an accord had brightened because of new U.S. flexibility after meetings in Washington.
The White House said President George W. Bush and Prime Minister Nouri al-Maliki discussed the talks Thursday via secured video teleconference and affirmed their commitment to completing the deal.
Nevertheless, the two sides remain far apart on core issues, including the number of bases where the United States will have a presence, and U.S. demands for immunity from Iraqi law for American soldiers and contractors.
Other obstacles include U.S. authority to detain suspects, fight battles without Iraqi permission and control of the country's airspace.
Iraq's parliament must sign off on the deal by year's end -- and approval is by no means certain.
Opposition to the initial U.S. demands brought together rival Sunni, Shiite and Kurdish leaders who all complain the deal would leave real power in American hands.
Oil Minister Hussain al-Shahristani, who is close to the country's powerful Shiite clerical leadership, told the British newspaper the Guardian this week that Iraq will demand the right to veto any U.S. military operation.
But American commanders believe they need such sweeping powers to protect U.S. soldiers in a combat zone.
Publicly, U.S. officials have expressed confidence they can find language that will satisfy the Iraqis on all major issues. But the negotiations are taking place against the backdrop of war and intense power struggles among rival ethnic groups in Iraq -- each with its own agenda.
The U.S. operates scores of bases throughout the country, including the sprawling Camp Victory headquarters in Baghdad, Asad airbase in western Iraq and the giant air facility at Balad, about 100 kilometres north of the capital that houses tens of thousands of American troops, contractors and U.S. government civilians.
It's still unclear how many of the facilities Washington would want to keep.
If all else fails, the two sides could go back to the UN Security Council and seek an extension of the mandate allowing troops in Iraq.
But that could prove politically embarrassing -- and difficult -- in the waning days of the Bush administration or the early days of the new U.S. presidency.
The current standoff has its roots in events last August when leaders of Iraq's rival factions -- facing enormous U.S. pressure to resolve their differences -- signed a declaration of unity.
It included a statement that Iraq's government wanted a long-term security relationship with the United States apart from UN mandates, which Iraq has long wanted to end.
A few months later, Bush and al-Maliki signed a statement of principles to negotiate two agreements -- a broad security framework and a second deal spelling out the rules for the U.S. military presence.
Talks began in March but Iraqi officials were outraged over the initial U.S. demands -- especially immunity for U.S. soldiers and security contractors.
The American draft also included no firm commitment to defend Iraq from foreign invasion -- which would require U.S. Senate approval -- nor a timetable for the departure of American troops, according to Iraqi officials. U.S. officials have released few details.
After Iraqi negotiators briefed legislators last month, politicians from all walks paraded in front of microphones to denounce the U.S. proposals.
Some commentators likened the U.S. position to the Iraqi-British treaty of 1930, which gave Britain virtual control of the country and is widely seen here as a humiliation.
Shiite legislator Haidar al-Abadi, speaking for al-Maliki's party, said June 4 that "negotiations are at a standstill, and the Iraqi side is studying its options.'' A week later al-Maliki himself said talks had reached a "dead-end.''
Aides scrambled to clarify that al-Maliki did not mean negotiations were over. But his comments reflected Iraq's resolve not to accept an agreement short of major Iraqi demands.
"We could not give amnesty to a soldier carrying arms on our soil,'' al-Maliki said then.
Such comments reflect each Iraqi faction's need to publicly defend Iraq's rights, amid the country's intense political rivalry.
Some Sunni groups, for example, privately favour a continued American presence as a counterweight to Iran's influence among Shiites. Yet several leading Sunni politicians signed a letter to Congress insisting on a timetable for a U.S. withdrawal -- in part to needle al-Maliki on an nationalistic issue.
Shiite parties, in turn, believe the agreement would shore up American support for al-Maliki ahead of parliamentary elections next year -- a goal they seek. But Shiite leaders are also anxious to take over full control of their country.
Meanwhile, recent Iraqi military successes against al Qaeda in Mosul and Shiite extremists in the south have convinced some Shiite politicians they don't really need America.
"Iraq has another option that it may use,'' al-Maliki said recently. "The Iraqi government, if it wants, has the right to demand that the UN terminate the presence of international forces on Iraqi sovereign soil.''