TALLIL AIR BASE, Iraq - The U.S. commander in Iraq predicted yesterday that some of the extra troops President Bush is sending could make an impact and start returning home by late summer, an optimistic note in contrast to skepticism of the plan back home.

Gen. George Casey said security in the war zone should gradually improve during the next three months as the 21,500 added troops build up in Baghdad and in Anbar province. However, the plan's success depends on the Iraqi government fulfilling its own pledges of adding troops and taking an aggressive approach to sectarian militias and death squads, he said.

Iraqi Prime Minister Nouri al-Maliki has failed to deliver on such promises before.

"I think it's probably going to be the summer, late summer, before we get to the point where the people in Baghdad feel safe in their neighborhoods," Casey told reporters at a news conference with Defense Secretary Robert Gates.

Asked when he thought some of the extra U.S. troops could be pulled back, Casey replied: "I believe the projections are late summer, but the first troops are just arriving," so nothing is sure.

Sounding his optimistic note, he said: "You're going to see some progress gradually over the next 60 to 90 days."

Gates, making his second trip to Iraq since he took over for Donald H. Rumsfeld on Dec. 18, headed home after a daylong visit that was not announced in advance.

His trip came as the Bush administration begins a new phase in the war that includes a troop buildup that has sparked widespread opposition in Congress and the general public, a shuffling of Mideast commanders and diplomats and intensified military pressure on Iran. Congress is to take up nonbinding legislation opposing the buildup next week.

"Our goal is an Iraq that can defend itself, sustain itself, and govern itself and live free from the scourge of extremism," Gates said. "There's widespread agreement here that failure would be a calamity for American national interests and those of many other countries as well."

The first extra troops - a brigade of the 82d Airborne Division - have just arrived in Baghdad, and Gates said it was too early to predict how Bush's plan for quelling sectarian violence in the capital would work.

Four other brigades are to arrive between now and May, assuming the Iraqis follow through on their commitment to bring three additional Iraqi army brigades into Baghdad and to allow raids against all illegal militias.

Administration officials have declined to estimate how long the extra troops will be needed in Iraq, saying it depends on conditions. Gates said earlier this month that the increase seemed likely to last months, but not 18 months or two years.

Casey had expressed reservations about adding U.S. troops in Baghdad before Bush announced the plan Jan. 10. The general said several factors had changed recently, including commitments by Maliki to not prohibit U.S. and Iraqi security forces from arresting leaders of Shiite militias who have political connections in the Maliki government.

Casey also said he was encouraged at the prospect of Maliki fulfilling his promise to send an extra three Iraqi army brigades to the capital to help the reinforced U.S. contingent.

Asked how the Iraqi government was doing to meet its commitments, he said: "So far, so good."

Casey will soon leave his post as part of a house-cleaning Bush is conducting on his military and diplomatic teams for the Middle East.

The U.S. troop reinforcements are supposed to secure Baghdad, although 4,000 of the extra troops are for Anbar province in western Iraq, where a Marine-led force is fighting the Sunni Arab insurgency.

Gates stopped earlier in Basra, the country's second-largest city, where he and Casey met with Maj. Gen. Jonathan Shaw, the newly arrived commander of British forces in southern Iraq.

At Tallil Air Base, which is near the ancient city of Ur and which had been a main air-defense post of the Iraqi military under Saddam Hussein, Gates and Casey met with commanders from several coalition countries, including Australia, Romania, Denmark and Britain, as well as with U.S. trainers of Iraqi forces.

Britain, which has the largest troop contingent among the U.S. allies with about 7,000 soldiers in the Basra area, is planning to withdraw a large portion of them this year.