Continued from page 1

“The specifics remain to be negotiated,” Mr. Gates said, “but I would say that if the Afghan people and the Afghan government are interested in an ongoing security relationship,” with some level of U.S. military presence. “The United States, I think, is open to the possibility of having some presence here in terms of training and assistance,” possibly using Afghan bases.

“We have no interest in permanent bases” for the United States, Mr. Gates said, “but if the Afghans want us here, we are certainly prepared” to stay.

Negotiations over a post-war security agreement with Afghanistan recall the struggle to fashion a security compact with Iraq three years ago, although these talks are unlikely to be as contentious. In both cases the United States had an interest in ensuring that chaos did not follow a U.S. withdrawal, allowing a new foothold for al Qaeda. What’s different is that the United States has a written agreement with Iraq that requires all U.S. forces to depart at the end of this year unless the Iraqi government reopens the question and invites the United States to stay.

Earlier, during an encounter with U.S. troops at Bagram Air Base, Mr. Gates said he thought the United States and Afghanistan both were interested in a longer-term U.S. military presence.

“Obviously, it would be a small fraction of the presence that we have today, but I think we’re willing to do that,” Mr. Gates told the soldiers. “My sense is, (Afghan officials) are interested in having us do that.”

This week’s visit is Mr. Gates‘ 13th trip to Afghanistan and probably one of his last as defense secretary. He has said he will retire this year but has not given a date.

After Afghanistan, Mr. Gates plans to fly to the Stuttgart, Germany, headquarters of U.S. Africa Command to attend a ceremony Wednesday marking the arrival of a new commander, Army Gen. Carter Ham.

Mr. Gates will attend a NATO defense ministers meeting in Brussels on Thursday and Friday.