BAGHDAD, June 15 -- U.S. combat troops will leave all Iraqi cities by their scheduled deadline of the end of this month, including Mosul, which remains the country's most dangerous urban area, the commander of U.S. forces said Monday.

American combat troops must pull back from cities by June 30 under a U.S.-Iraqi security pact that took effect this year. But Gen. Ray Odierno, the American commander, said this year that troops might remain in Baghdad and the northern city of Mosul because of continuing security concerns.

During a news conference Monday with senior Iraqi officials, Odierno said violence has declined because of a number of successful military operations in the past month or so.

"We had reservations in Mosul a few months ago," Odierno said. "But I feel much more comfortable with the situation in Mosul now."

Al-Qaeda in Iraq, a Sunni insurgent group, and other foreign fighters are believed to have regrouped in Mosul and the surrounding towns in Nineveh province after they were defeated in Baghdad and western Iraq.

Odierno said that he is still "absolutely committed" to leaving all urban areas on schedule but added that a number of troops will remain in Iraqi cities as advisers and trainers to work with Iraqi security forces. He did not specify how many troops would remain or where they would be based.

"We will not get into any specific numbers, but it is a very small number," he said. Odierno said 320 U.S. military bases remain in Iraq, down from 460, but he did not specify how many of them were in Iraqi cities.

"The dark days of the previous years are behind us. Iraqis are able to live more normal lives," Odierno said. "It is a fitting time for our combat forces to move out."

But while many Iraqis are happy to see U.S. troops leave their country, they fear a resurgence of violence after the withdrawal. Some have expressed reservations, saying Iraqi forces are not ready to assume responsibility for security.

Last week, Prime Minister Nouri al-Maliki warned a gathering of hundreds of top military commanders from across the country that "terrorist operations" could increase ahead of the U.S. withdrawal from cities and a crucial vote for parliament in January.

Under the joint security pact that took effect in January, as many as 50,000 U.S. troops will remain in Iraq in an advisory role until the end of 2011. But combat troops will leave inner cities on June 30 and Iraq by August 2010, under President Obama's plan.

Odierno said the number of foreign fighters entering Iraq has dropped significantly thanks to improved security along the border and efforts by neighboring Syria.

"For the most part, it has just been a trickle," Odierno said. "We have seen some fighters coming through Syria, but Syria has been taking some action over the last few weeks, so hopefully that will continue."

Ali al-Dabbagh, the government spokesman, said the day U.S. forces left "would be written in Iraqi history."

He added that there would be no American combat missions unless requested by the Iraqi government.