US Army Gen. Ray Odierno said troops operating alongside Iraqi forces out of shared urban bases could remain because the US military believed they were essentially supporting Iraqi forces rather than serving as combat troops.

"We believe that's part of our transition teams ... in the Joint Security Stations," Odierno told reporters traveling with visiting US Defense Secretary Robert Gates at a US military base in Balad, northwest of Baghdad on Saturday. "We believe we should still be inside of those after the summer." Pentagon press secretary Geoff Morrell told reporters on Gates' plane as he flew back to Washington that "the vast majority of US forces garrisoned in Iraqi cities will be gone from those cities" by the end of June.

"The only forces remaining behind will be there at the invitation of the Iraqis to perform training and mentoring of Iraqi forces," Morrell said. He said those forces could still take part in combat missions but their primary role would be assisting Iraqi forces. "If the Iraqis wish, those training and mentoring forces will participate with them in combat operations," he said.

The general's remarks came as controversy bubbled in Iraq over a government spokesman's suggestion that US forces might not fully withdraw from the country by the end of 2011, as agreed to in the pact ratified by the Iraqi presidency on Dec. 4. Spokesman Ali al-Dabbagh, on a visit to Washington this week, said the Iraqi security forces might need 10 years to get ready to take over from US troops.

"What Dr. Ali al-Dabbagh announced about Iraqi forces needing 10 years to be ready was a personal opinion and does not represent the Iraqi government opinion," Prime Minister Nuri al-Maliki's office said in a statement.

Maliki's statement underscored the sensitivity of the future of US troops in Iraq as violence begins to ease more than five years after the 2003 invasion unleashed horrific bloodshed.

Iraq's parliament approved the security pact last month after fierce debate. It is scheduled to be put to a referendum next year.

Opponents of the pact, including supporters of anti-American Shiite cleric Moqtada al-Sadr, have argued it gives legitimacy to a destructive foreign occupation and say they do not believe the United States will honor the withdrawal date.

"This agreement was designed to legitimize the US presence in Iraq," said Ahmed al-Massoudi, a politician from Sadr's bloc in parliament.