In an era of doomsday scenarios, this is among the worst: Terrorists detonate a small nuclear weapon on Pennsylvania Avenue during the presidential inauguration.

The president and vice president, congressional leaders and much of the outgoing Cabinet are killed in the blast, not to mention thousands of ordinary citizens. It is not immediately clear who is still alive -- or who is in charge. Much of federal Washington is uninhabitable. Many agency leaders are dead. Federal employees who are still alive cannot get to their offices.

The scenario, outlined in a report last year by the independent Continuity of Government Commission, is extreme. But commission members and other experts say it illustrates that, nearly three years after the Sept. 11, 2001, attacks shut down agencies and threw Congress into temporary chaos, serious questions remain about the government's ability to make crucial policy decisions and provide basic services after an attack.

Although much of the legislative debate since Sept. 11 has been about how to quickly replace dead or incapacitated lawmakers, less noticed have been such matters as whether Americans would continue to get their Social Security checks, veterans hospitals would stay open, the banking system would function and mail would be delivered. Maintaining such government services, important in and of themselves, would assure Americans that the country remains unbowed, experts say.

"What you would hope to do if something drastic happened is to convince people that it's limited and it's contained, and awful as it is . . . the basics of our lives go on," said Norman J. Ornstein, a scholar at the American Enterprise Institute and an adviser to the independent commission, a joint project of AEI and the Brookings Institution.

It's not a new subject. Plans to ensure the survival of federal rule after a catastrophic attack date to the Cold War and fears of a massive nuclear strike by the Soviet Union. After Sept. 11, President Bush activated such plans for the first time, dispatching a shadow government of about 100 senior civilian managers to live and work secretly outside Washington.

More recently, the Federal Emergency Management Agency supervised the deployment of thousands of federal workers to secret sites in a test of whether agencies could carry on essential work in dire circumstances.

In 1998, a presidential directive put FEMA in charge of continuity of operations planning (COOP). FEMA told agencies to identify essential functions, devise methods to preserve vital records and develop succession orders for key jobs. Agencies had to be able to reach alternate facilities within 12 hours of an attack and operate there for as long as a month.

A recent General Accounting Office review of plans for 35 departments and agencies found that none fully met all requirements. Agencies variously did not prioritize essential functions and did not account for their reliance on other agencies to carry out critical missions. Few agencies documented that they had adequate communications capabilities and space for staff and equipment in alternate facilities. And few had done recommended tests of plans. The report did not name the offices.

"Until these weaknesses are addressed, agencies are likely to continue to base their plans on ill-defined assumptions . . . and, as a result, risk experiencing difficulties in delivering key services to citizens in the aftermath of an emergency," Linda D. Koontz, a senior GAO official, testified at an April hearing of the House Government Reform Committee.

Rep. Thomas M. Davis III (R-Va.), the committee chairman, put it in starker terms, saying some agencies were "woefully prepared."

"Here we sit, 2 1/2 years after facing the mortal threat of 9/11, and we still cannot be assured that we are prepared to provide essential government services in the wake of a disaster," Davis said. "My colleagues and I want some answers."

Officials at FEMA, now part of the Department of Homeland Security, say most problems have been fixed. They say the GAO studied plans from 2002, many of which have since been updated.

"I believe that every department and agency has a very good, robust COOP plan in place that we just now need to fine-tune," Michael Brown, DHS undersecretary for emergency preparedness and response, told the committee.

FEMA is revising its guidance to ensure plans are more complete, Brown said. It has established a COOP working group of 67 departments and agencies in the Washington area, and smaller working groups at the regional level.

Most important, officials say, plans are being tested.

In May, FEMA led Forward Challenge '04, an exercise in which nearly 4,000 employees from 45 agencies fanned out to more than 100 secret sites in response to a simulated terrorist attack. The "crisis" was an attempted suicide bombing in the Metro, followed by the death of three Cabinet secretaries in a car accident, an assault by hackers on air traffic control systems and intelligence reports of an imminent threat of a major attack in Washington.

Officials offered few details but said the exercise went well. In an actual emergency, many thousands more workers would be dispatched to the alternate sites, generally within a two-hour drive of Washington, officials said. An after-action report is expected next month.

"We demonstrated for the first time ever through the exercise that . . . we can get to our alternate operating sites and that we can perform the communications and the interagency interdependencies necessary to continue the work of the government," Reynold N. Hoover, FEMA's director of national security coordination, said in an interview. "Does more planning and more work need to be done? Yes, certainly we do need to do that, and we continue to do that."

The best defense may be the sprawling nature of the 1.8 million-strong federal civilian workforce, analysts say. Nearly nine of every 10 federal employees live and work outside the Washington region. A terrorist strike in the nation's capital, however devastating, would leave much of the government's decentralized operations untouched. In fact, several key agencies are headquartered outside Washington, including the Social Security Administration in Baltimore and the Centers for Disease Control in Atlanta, said Donald F. Kettl, a political scientist at the University of Wisconsin at Madison.

One of the most decentralized departments is Agriculture, with 98,000 federal employees and 25,000 buildings. The department's emergency plans rely, in part, on its ability to send many of its 7,000 Washington-area employees to regional facilities.

"USDA has an advantage, because we're everywhere," said John Surina, deputy assistant secretary for administration. "We're in every county of the country."

The department has two major computer centers, one in Washington and one elsewhere, Surina said. Vital records are stored on computer disks and databases outside Washington. Top officials have been given cell phones designed to keep working even when regular cellular service is overwhelmed, as it was on Sept. 11. At least one Senate-confirmed deputy is always out of town, poised to take charge if top leaders are wiped out in a catastrophic attack.

"We feel pretty good," Surina said of the plans.

A potential weak spot for the government, said Kettl, is the complex communications and computer systems that tie everything together.

"All the agencies have spent a lot of time since September 11 trying to harden those, trying to test them, trying to insulate them," he said. "And nobody really knows for sure how well they would work in the absence of a real-life kind of test."

The Social Security Administration is another agency with a well-dispersed workforce, with about 65,500 employees in more than 1,300 field offices, 36 call centers and other facilities across the country. But key choke points may be vulnerable, said Witold Skwierczynski, president of an American Federation of Government Employees union local at SSA.

The agency relies on a computer center in Baltimore to maintain records and process benefits, sending information electronically to the Treasury Department in Washington, which issues Social Security checks, he said. An attack on the computer system or in Washington could cause trouble.

"If they lost the computer records or if there was a disruption in the ability to send out checks, that would probably lead to severe economic problems throughout the United States," Skwierczynski said. "There are 40 million people getting checks every month."

Brown, the FEMA official, testified that the agency has established regional COOP working groups that include many of the 28 federal executive boards, regional entities whose mission is to improve coordination among federal programs outside Washington.

Kathrene Hansen, executive director of the Federal Executive Board of Greater Los Angeles, said her organization, which has a staff of two, could serve as an important conduit of information for the region's 60,000 federal employees after an attack. But agencies do not have to inform the board of their status, Hansen said. "We can't make anybody do anything," she said. "So to have an expectation that we're going to have this central role in being responsible for continuity of operations is inconsistent with the way we're funded, the way we're staffed and the lack of authority that we have."

Part of the recent FEMA exercise was to make contact with the federal executive boards, Hansen said. But officials simply sent her an e-mail, which Hansen did not see because she had the day off and cannot access her e-mail remotely. When someone tracked her down by phone to ask why she had not responded, Hansen said she had no way of knowing the e-mail had been sent.

Hoover, the FEMA official, said there is "a lot of work yet to be done" to ensure that federal employees outside Washington know what to do. And agency officials need to be able to more easily contact FEMA about their status at alternate locations, he said.

Despite such problems, Ornstein, the government scholar, said federal officials have done "far more" planning about continuing basic executive branch services than about filling congressional vacancies after an attack. That does not mean such plans will work, he said.

"But what you can say is at least they are doing exercises . . . at least they are consciously aware of the potential problems," he said. "You never know in advance if it will work, but it will work a lot better if you do the gaming in advance and you can sort of see where the real glitches turn up."

Homeland Security Secretary Tom Ridge, left, and Undersecretary Michael Brown, center, speak with Wayne Rhodes, co-director of Forward Challenge '04.