Iraqi Prime Minister Nouri al-Maliki dug in his heels Monday on the future of the US military in Iraq, insisting that all foreign soldiers leave the country by a specific date in 2011 and rejecting legal immunity for American troops. Despite the tough words, al-Maliki's aides insisted a compromise could be found on the two main stumbling blocks to an accord governing the US military presence in Iraq after a United Nations mandate expires at the end of the year. Last week, US and Iraqi officials said the two sides agreed tentatively to a schedule that includes a broad pullout of combat troops by the end of 2011 with the possibility that a residual US force might stay behind to continue training and advising Iraqi security services. But al-Maliki's remarks indicated his government was not satisfied with that arrangement and wants all foreign troops gone by the end of 2011. That cast doubt on whether an agreement is near and suggested al-Maliki is playing to a domestic audience frustrated by the war and eager for an end to the foreign military presence. "There can be no treaty or agreement except on the basis of Iraq's full sovereignty," al-Maliki told a gathering of Shiite tribal sheiks. He said an accord must be based on the principle that "no foreign soldier remains in Iraq after a specific deadline, not an open time frame." Al-Maliki said the US and Iraq had already agreed on a full withdrawal of all foreign troops by the end of 2011 - an interpretation that the White House challenged. Until then, the US would not conduct military operations "without the approval" of the Iraqi government, al-Maliki said. White House spokesman Tony Fratto said negotiations with the Iraqis were continuing and repeated the US position that the withdrawal must be linked to conditions in Iraq - a clear difference with al-Maliki's interpretation of what had been agreed. "Any decisions on troops will be based on the conditions on the ground in Iraq. That has always been our position and continues to be our position," Fratto said Monday in Crawford, Texas. "There is no agreement until there is an agreement signed." Fratto said the US was "optimistic that Iraq and the US can reach a mutual agreement on flexible goals" and allow "Iraqi forces to provide security for a sovereign Iraq." President Bush has long resisted a timetable for removing troops from Iraq, even under strong pressure from an American public distressed by U.S. deaths and discouraged by the length of the war that began in 2003. Last month, however, Bush reversed course and agreed to set a "general time horizon" for bringing troops home, based on Iraq's ability to provide for its own security. But the Iraqis insisted they want a specific schedule. "We find this to be too vague," a close al-Maliki aide told The Associated Press on Monday. "We don't want the phrase 'time horizons.' We are not comfortable with that phrase," said the aide, who spoke on condition of anonymity because of the sensitivity of the negotiations. Another top al-Maliki aide, also speaking on condition of anonymity for the same reason, said the Iraqi government had "stopped talking about the withdrawal of combat troops. We just talk about withdrawals," including trainers and logistics troops. U.S. and Iraqi officials said last week they had agreed to remove American combat troops from Iraq's cities by next June, withdrawing to bases where they could be summoned if necessary. The officials spoke on condition of anonymity because of the sensitivity of the issue, but the plan appeared in line with a US strategy to turn urban security over to Iraqi police. During his Monday address, al-Maliki also suggested the question of legal immunity for US military personnel or contractors remains a sticking point in the negotiations. The draft agreement provides that private US contractors would be subject to Iraqi law but the Americans are holding firm that US troops would remain subject exclusively to US legal jurisdiction. The US has ruled out allowing American soldiers to face trial in Iraqi courts. But al-Maliki said his country could not grant "open immunity" to Iraqis or foreigners because that would be tantamount to a violating the "sanctity of Iraqi blood." He did not elaborate. One of the al-Maliki aides said he believed language could be found to overcome differences over the withdrawal schedule but immunity was a tougher issue to resolve. US officials in Washington have privately expressed frustration over the Iraqi stand in the negotiations, which were supposed to have ended by July 31. The agreement must be approved by Iraq's factious 275-member parliament, where opposition to a deal is strong. It appeared al-Maliki was seeking to bolster his nationalist credentials ahead of provincial elections late this year and a national ballot in 2009. Al-Maliki's Shiite allies face a strong challenge from followers of anti-American cleric Muqtada al-Sadr, long an opponent of the US presence. The prime minister's strong statements in support of an end to immunity and for a firm withdrawal timetable would make it difficult for him to accept an agreement that falls short of his public demands. In violence Monday, an American soldier was mortally wounded in a shooting attack on his foot patrol in north Baghdad, the U.S. military said. An Associated Press tally shows at least 4,147 US military personnel have died in the Iraq war since it began in March 2003.