Donald Rumsfeld was speaking during a visit to the Bagram base that serves as the main airfield for US forces in Afghanistan.
"If we were to withdraw from Afghanistan precipitously, or from Iraq, the terrorists would attack us first somewhere else and then they would attack us at home, let there be no doubt," he said.
Rumsfeld went on to thank the soldiers for their service. "The momentous changes here could not have happened without your service," he said.
Earlier in Kabul, Afghanistan's capital, Rumsfeld said reducing the number of US troops in Afghanistan would not weaken the campaign against Taliban fighters and al-Qaida terrorists who still threaten this war-torn country.
"We certainly remain committed to our long-term relationship, the strategic partnership between our two countries," Rumsfeld told a news conference on Wednesday outside the heavily guarded presidential palace after meeting with Hamid Karzai, the Afghan president.
"We certainly remain committed to our long-term relationship, the strategic partnership between our two countries"
US Defence Secretary
Rumsfeld spoke a day after he announced that the size of the US force in Afghanistan would shrink from about 19,000 now to about 16,000 by next summer.
"We will continue to be focused on rooting out the Taliban and al-Qaida that still exist in causing difficulties for your country," Rumsfeld told Karzai, who stood beside the Pentagon chief at the news conference.
Karzai, noting that Vice -President Dick Cheney had visited Kabul on Monday, told reporters that the US government has assured the Afghans that a drawdown of US forces will not undermine joint efforts to improve security.
"The United States has assured us of continued support and assistance on all matters," including security, Karzai said, adding that his own forces were becoming more capable of handling problems on their own.
US has assured Afghanistan of
continued support and help
There are about 26,800 soldiers in the Afghan national army and about 55,000 national police. Rumsfeld said the remaining US troops would continue to help train and equip the Afghan security forces and will work with NATO on a variety of security projects.
Rumsfeld told Karzai it was his 10th visit to Afghanistan since the US-led invasion in October 2001 that deposed the Taliban rulers. More than four years later, US forces have captured neither al-Qaida leader Osama bin Laden, who had used Afghanistan as a base before the US invasion, nor Taliban leader Mullah Omar.
Rumsfeld told reporters traveling with him that bin Laden, if still alive, is most likely hiding in the Afghan-Pakistani border area.
In Pakistan on Wednesday, Rumsfeld toured several US military units that are part of an international humanitarian relief operation for victims of the 8 October earthquake that devastated parts of northwestern Pakistan and the disputed Kashmir region. The quake killed more than 80,000 people and forced more than 3 million from their homes.
US forces have been in
Afghanistan for four years
At Muzaffarabad, a town near the epicenter of the quake, Rumsfeld visited the 212th Mobile Army Surgical Hospital. Col. Angel Lugo, the unit's commander, old him that more than 200 patients a day were being treated at the facility, which included an intensive care unit.
Lugo said that about one-third of the patients were suffering directly from quake-related injuries.
Rumsfeld also flew by helicopter to Shinkiari, where a Marine Corps medical unit is providing care for about 200 people a day, and to Qasim army airfield, where US soldiers are maintaining the helicopters and other aircraft used in the humanitarian relief mission.
At each stop, the hastily erected US facilities were decorated with reminders of the Christmas season, including Christmas tree ornaments atop tent stakes and handmade greeting posters.
Marine Corps Col. Mark Losak, chief of staff to the US disaster assistance coordinator, said that while no firm date had been set for US forces to leave Pakistan he thought it likely would be mid- to-late-March.