BAGHDAD (Reuters) - Iraq will not accept any security agreement with the United States unless it includes dates for the withdrawal of foreign forces, the government’s national security adviser said on Tuesday.

But the government’s spokesman said any timetable would depend on security conditions on the ground.

Their differences underscore the debate in Baghdad over a deal with Washington that will provide a legal basis for U.S. troops to remain when a U.N. mandate expires at the end of the year.

But Washington played down calls from Baghdad for a firm withdrawal deadline, saying both sought greater Iraqi security.

U.S. Defense Secretary Robert Gates said on Tuesday he expected to pull more U.S. troops from Iraq and stressed any decision to withdraw would be based on the ability of Iraqi troops to take responsibility for security and combat.

On Monday, Prime Minister Nuri al-Maliki suggested for the first time that a timetable be set for the departure of U.S. forces under the deal being negotiated, which he called a memorandum of understanding.

National Security Adviser Mowaffaq al-Rubaie appeared to go further on Tuesday.

“We can’t have a memorandum of understanding with foreign forces unless it has dates and clear horizons determining the departure of foreign forces. We’re unambiguously talking about their departure,” he told reporters in Najaf after meeting Iraq’s top Shi’ite cleric, Grand Ayatollah Ali al-Sistani.

He said he had spoken to Sistani about the U.S. talks, but did not say if the cleric had an opinion on the negotiations. The revered cleric is routinely briefed on key national issues.

“I informed the (clerical leaders) about some of the advances in the talks ... There is a big difference in outlook between us and the Americans,” Rubaie said, adding Iraq’s 500,000-strong security forces had greatly improved.

Government spokesman Ali al-Dabbagh, speaking on al-Hurra television, said it was an Iraqi demand to know when foreign forces would leave.

“Will this be through a timetable, a timeframe or time horizon? It depends on the situation on the ground. I think this will determine the dates or will affect whether it is possible to put (the departure) under a timetable.”

A senior Shi’ite official added: “It is very soon to talk about details. The talks are in the early stages.”

Iraqi girls walk in front of U.S. Marines during a joint operation with Iraqi army in Huseiniya, near Baghdad July 8, 2008. REUTERS/Damir Sagolj

U.S. SEES “SHARED GOALS”

The Bush administration has always opposed setting any withdrawal timetable, saying to do so would allow militant groups to lie low and wait until U.S. troops in Iraq left.

Gates, speaking to reporters during a visit to the Fort Lewis Army base in Washington state said, “As the Iraqi security forces get stronger and get better then we would be able to continue drawing down our troops in the future.”

“This transition of control and primary responsibility for security is a process that is well under way and, based on everything I’ve heard, we will be able to continue,” the Pentagon chief said. “However, that really depends on the situation on the ground.”

Washington was looking for an agreement “that satisfies both our needs,” U.S. State Department spokesman Gonzalo Gallegos said.

“The U.S. government and the government of Iraq are in agreement that we, the U.S. government, we want to withdraw, we will withdraw. However, that decision will be conditions-based,” he said.

In a further complication, Iraq’s deputy parliament speaker Khalid al-Attiya said deputies must approve any deal the Iraqi government reaches and will probably reject the document if American troops are immune from Iraqi law.

It would be virtually unthinkable for the United States to allow its soldiers to be subject to Iraqi law.

Maliki’s preference for a memorandum of understanding, which could be an attempt to bypass parliament, is in contrast to earlier talks which have all been leading to the signing of a formal Status Of Forces Agreement, or SOFA.

“Without doubt, if the two sides reach an agreement, this is between two countries, and according to the Iraqi constitution a national agreement must be agreed by parliament by a majority of two thirds,” Attiya told Reuters in an interview.

Washington has SOFA pacts with many countries, and they typically exempt U.S. troops from trial or prison abroad.

Iraq said last week Washington was showing flexibility on some key issues, including dropping a demand for immunity for private contractors working for the U.S. government.

Control of military operations and airspace are other points of contention, along with the detention of prisoners.

The Pentagon has 146,000 troops in Iraq. That force level should drop to about 140,000 by the end of July under a planned reduction. Commanders will then assess security conditions before recommending further troop cuts.