It had been an eventful morning for Army Spec. Steven Box. The 20-year-old had been working in a Pentagon office near the secretary of defense's suite when a commotion erupted. Terrorists had taken over the secretary's office. Some kind of chemical had been released.

With hundreds of others, Box raced out of the Pentagon, where he stripped down to his shorts and dashed through a cold-water decontamination shower. Defense staff members, some sweating and coughing violently, were being carried off, while others lay deathly still.

As Box trotted away from the scene, he grabbed a buddy's oxygen mask and popped it on his own face.

"Eeew," he said, grinning. "Your breath stinks."

Box was part of an elaborately scripted training exercise conducted yesterday at the Pentagon, involving 500 people and several federal and local agencies. The drill, dubbed "Cloudy Office" by the Defense Department, was designed to test the agencies' response to a terrorist attack on the U.S. military headquarters, the world's largest office building.

The scenario sounded like a plot straight from the "X Files": A dozen members of a radical group, wielding pistols, shotguns and carrying a one-gallon jug of sarin, a lethal nerve gas, burst into the secretary of defense's office and take the staff hostage.

In the ensuing melee, the container of nerve gas is kicked over and fumes begin to seep through the Pentagon. Two hundred people are stricken, and all 25,000 of the massive building's workers must be evacuated. Hazardous-material teams from local fire stations are called to the scene, and military personnel set up triage units while members of the Defense Department's police force, the Defense Protective Service, send in officers to negotiate with the terrorists.

In the end, the hostages are released and the terrorists, who also fall victim to the gas, are captured.

Officials say the exercise, four months in the planning, was meant to help local agencies coordinate their response to a crisis involving weapons of mass destruction -- nuclear, biological or chemical -- in a civilian setting. In recent years, federal officials have become increasingly concerned that the capital is vulnerable to just such a terrorist attack.

There have been several scares recently; in March, several blocks of downtown Washington were blocked off and evacuated after authorities found a plastic jug containing a clear liquid on the sidewalk less than a block from the White House. It turned out to be tap water.

And last year, the D.C. headquarters of B'nai B'rith received a package containing a petri dish labeled as anthrax, a deadly bacterium. The petri dish, it was later determined, contained only a harmless bacteria, but D.C. emergency response crews first on the scene were later criticized for opening the package at the site, which could have exposed thousands of people to deadly anthrax spores.

Pentagon spokesman Glenn Flood said the local incidents -- along with a 1995 attack in Tokyo in which a religious cult released sarin gas in the subway system, killing 12 people and injuring more than 5,500 -- are serving as a "wake-up call" to local authorities.

"We like to think that it cannot happen here," he said, "but that is an unsafe assumption."

To those driving and cycling by, the Pentagon exercise yesterday presented quite a sight. A dozen firetrucks and other emergency vehicles, lights flashing, were parked outside the Pentagon's massive entrance overlooking the Potomac, while firefighters and other emergency personnel outfitted in bright yellow anti-contamination suits dragged hoses around and gas-masked doctors clad in camouflage treated "victims" lying on the ground. Hundreds of young men and women clad in shorts and bathing suits raced through the spray shooting out of three firetrucks.

The exercise also included the FBI and the Metropolitan Medical Strike Team, a unit of local fire, police and emergency medical services forces set up by the Metropolitan Washington Council of Governments to deal with such crises.

There were a few hitches. One participant pointed out that the water used in the decontamination showers was pouring down storm drains -- a potential problem if the water actually had been contaminated with a lethal substance.

But officials said they will evaluate the exercise in the coming months and make the changes needed to react more effectively to a real threat.

"If we are successful, if we are seamless," said Arlington County Fire Chief Edward Plaugher, "we have created the best deterrent you can possibly buy." CAPTION: Emergency workers assist a man who played a hostage during the drill to test the response to a simulated chemical-weapons release. CAPTION: About 500 people took part in the elaborately scripted exercise.