Enlarge Pool photo U.S. Secretary of State Condoleezza Rice flew to Baghdad for discussions, hoping to iron out remaining differences in a U.S.-Iraq security deal that envisions the withdrawal of American troops. BAGHDAD  The Bush administration and Iraqi government are close to completing a security agreement that Iraqi officials said tentatively calls for U.S. combat troops to be withdrawn from Baghdad and other cities by next summer. Secretary of State Condoleezza Rice, who made an unannounced visit Thursday to Baghdad to push the deal forward, said an agreement was near although some details need to be worked out. The current draft calls for U.S. troops to pull out of Iraqi cities and villages and withdraw to their bases by June 30, said Iraqi government spokesman Ali al-Dabbagh and Ali Adeeb, a close aide to Prime Minister Nouri al-Maliki. The draft calls for all U.S. combat troops to be out of Iraq by 2011, they said. Negotiations have dragged on for months on the security deal, which includes several other contentious issues such as whether U.S. troops would besubject to prosecution in Iraqi courts. President Bush, al-Maliki and the Iraqi parliament must sign off on the 23-page draft, meaning key points are subject to change. An agreement on the legal basis for U.S. forces in Iraq is necessary because the current U.N. mandate expires at the end of this year. Rice did not discuss specific pullout dates during her one-day trip to Baghdad, though she told reporters that both governments agreed that "aspirational timetables … are well worth having." "There are still issues concerning exactly how our forces operate," Rice said. Iraqi Foreign Minister Hoshyar Zebari said the sides were "very, very close to closing" the deal. Al-Dabbagh suggested, though, that some discussion remains. He said Iraqi officials told Rice the "U.S. needs to be more flexible (and) needs to respect Iraqi sovereignty." There are 140,000 U.S. troops in Iraq. About half of them are in combat brigades, though it's unclear how many troops would remain in a supporting role once combat troops leave. Iraq initially wanted all combat troops out by the end of 2009, but agreed to push the date to 2011 after the U.S. agreed to protect Iraqi funds in U.S. banks from being seized by creditors, Adeeb said. Spokesman al-Dabbagh said that any withdrawal date in the agreement could be changed if security worsened. He said the date only refers to American combat troops. Support and training forces would remain at Iraq's request, he said. "It is in the Iraqi interests that the withdrawal of American troops not undermine the successes we've had," al-Dabbagh said. "At the end, the situation on the ground will be taken into consideration and both sides will jointly decide whether or not to make amendments." He said Iraq wants U.S. troops to only have immunity on American bases and during military operations that the Iraqi government has signed off on. The Americans have accepted this, but reject Iraqi demands that violations be handled in Iraqi courts of law, al-Dabbagh said. White House spokesman Gordon Johndroe said he would not comment on ongoing negotiations. The U.S. Embassy in Iraq also declined to comment. The draft includes such details as how U.S. personnel will come and go from the country, which radio frequencies will be reserved for U.S. communications, and how Iraq can monitor weapons and materials brought into Iraq by the U.S., Adeeb said. Supporters of Shiite cleric Muqtada al-Sadr, whose Mahdi Army has battled U.S. forces off and on since 2004, insist on a binding timeline for all U.S. troops to withdraw. Salah al-Ubeidi, an al-Sadr spokesman, said the agreement "does not serve the interests of Iraq." Guidelines: You share in the USA TODAY community, so please keep your comments smart and civil. Don't attack other readers personally, and keep your language decent. Use the "Report Abuse" button to make a difference. You share in the USA TODAY community, so please keep your comments smart and civil. Don't attack other readers personally, and keep your language decent. Use the "Report Abuse" button to make a difference. Read more