"Discussions are ongoing with the Iraqis to finalise a bilateral agreement," Gordon Johndroe, a White House spokesman, said.

"We are working to complete the agreement, but it is not final yet."

On Thursday, Condoleezza Rice, the US secretary of state, arrived in Baghdad on an unannounced visit, the office of Nuri al-Maliki, the Iraqi prime minister, said.

Details about the purpose of her visit were not given.

Iraqi officials say the deal is nearly finished, but the White House says it is not yet complete.

They say they want the deal to include "time horizons" for US forces to withdraw from the country.
   
Other issues that need to be sorted out include immunity for US troops from Iraqi law and the status of prisoners held by American forces.

Contentious issues

Al Jazeera's Tom Ackerman said that with Iraqis facing provincial elections in the next few months, al-Maliki will be facing pressure at home not to concede anything that will affect Iraqi sovereignty and to ensure a firm end date for US troop withdrawal is set.

But Mohammed al-Haj Hamoud, Iraq's negotiator on the deal, told the Reuters news agency that the draft reportedly agreed to does not give a timetable for the withdrawal of US forces from Iraq  and does not say if US troops will be subject to Iraqi law.

At present around 144,000 US troops are stationed in Iraq, but Iraqi officials have said they would like any future deal to limit the US presence on Iraqi streets by mid-2009 and withdraw all troops by 2010 or 2011.

The US government has said repeatedly that it will not seek permanent bases in Iraq.

However, it has also resisted setting any timetable for the withdrawal of troops, although last month the US government began referring to "time horizons" and "aspirational goals" for such a withdrawal.

A timeline for withdrawing troops, their immunity from Iraqi law and the status of prisoners held by US forces have all caused repeated delays to a deal.

In May this year scores of protests against any such deal erupted in the capital, Baghdad, led by Muqtada al-Sadr, the Iraqi Shia leader.

Alongside the possible draft deal is a parallel agreement, known as a strategic framework agreement, which covers a range of political, economic and security relationships between the US and Iraq, that The Associated Press said had also been agreed to.