Defense Secretary Robert Gates declared Monday that the United States will remain in Afghanistan for the foreseeable future, no matter what President Obama decides on immediate troop levels.