But the next administration may face a decision: Has the time come to scale back security spending, eliminating the least productive programs? Or, with tumult in the Arab world and America still a prime target, would that be dangerous?

Many security experts believe that a retrenchment is inevitable and justified.

“After 9/11, we had to respond with everything we had, not knowing what would work best,” said Rick Nelson, a former Navy helicopter pilot who served in several counterterrorism positions and is now at the Center for Strategic and International Studies. “That’s a model we can no longer afford, financially or politically.”

Michael V. Hayden, who led both the National Security Agency and the Central Intelligence Agency in the years after the Sept. 11 attacks, agrees that the time will come for security spending to be scaled back and believes that citizens need to decide when that should happen. Personally, he would wait a while longer.

“I would stand fast for now,” said Mr. Hayden, who is an adviser to Mitt Romney.

In the view of most specialists, the danger to United States territory from Al Qaeda and its allies is far less than it was in 2001. Al Qaeda’s leaders have been relentlessly hunted, its ideology was rejected by most of the young Muslims who led the Arab revolts, and its recruits in the United States have been few. Of more than 160,000 homicides in the country since Sept. 11, 2001, just 14 were carried out by Qaeda sympathizers in the name of jihad.

Some of the credit is no doubt due to domestic security efforts, which cost $470 billion in federal money, $110 billion in state and local budgets and $110 billion in private-sector spending from 2002 to 2011, according to John Mueller, a political scientist at Ohio State University. That money has paid for an alphabet soup of new agencies: the Department of Homeland Security, the Office of the Director of National Intelligence, the National Counterterrorism Center, the Terrorist Screening Center and many others, each with a supporting cast of contractors. Old agencies like the C.I.A. and the F.B.I. have bulked up, and a record 4.8 million people hold security clearances.