— Defense Secretary Robert M. Gates on Monday came out against a swift shift to a smaller counterterrorism mission for U.S. troops in Afghanistan, telling soldiers here that the United States should keep the military pressure high throughout the year in order to force the Taliban to negotiate.

On the third day of a trip to Afghanistan, his last visit to the war zone as defense secretary, Gates praised the military progress against the Taliban and al-Qaeda but said, “We’ve still got a ways to go and I think we shouldn’t let up on the gas too much, at least for the next few months.”

President Obama will soon decide how many troops to pull out from Afghanistan starting next month and the pace of the drawdown in the months ahead. The number of soldiers in Afghanistan has long divided the Obama administration into different camps — those who advocate for fewer troops engaged narrowly on killing and capturing insurgent leaders, and those who want as many soldiers as possible to work on development and governance reforms in addition to fighting the Taliban.

Gates, who supported President Obama’s 30,000-troop increase in 2009, has repeatedly cautioned against radical changes in the mission in the near term during his Afghanistan visit, even as more officials in Washington are pushing for a faster withdrawal.

“I think over time our mission will be less and less [counter-insurgency] and more and more counterterrorism, so there will be a transition. But I don’t think we are ready to do that yet,” Gates said at Combat Outpost Andar in the Ghazni province of eastern Afghanistan. “If we keep the military pressure on through this winter, and we are able to hang on to what we’ve taken away from these guys over the last year to 18 months ... then it may be that sometime around the end of this year these guys decide maybe we ought to start talking seriously about reconciliation. That certainly is my hope.”

Gates, just days from retirement, remains actively involved in this major decision by Obama. The outcome of the war in Afghanistan will help shape the legacy of his 41 / 2-year tenure as defense secretary. When he’s done, Gates said he has books he wants to write about his tenure. But under the beating sun in Logar province, at Forward Operating Base Shank, his last stop before returning to Kabul, he wasn’t in a very nostalgic mood.

When asked by one U.S. soldier whether he had any advice for a friend who aspired to be defense secretary, Gates replied: “Don’t.”

“Or if he is, move his office somewhere outside of Washington.”