Norman Hughes was sitting at his computer in the engineer control room in the sub­basement of the National Archives on Monday when his screen flashed an alarm that the building’s flood control barriers had been activated.

Outside, an epic rainstorm was dumping enormous amounts of water on the Washington area, and on this giant stone structure built on pilings over an ancient creek bed.

Thirteen years earlier, another such storm caused a near-disaster when more than a dozen feet of water in some places surged into the building on Pennsylvania Avenue NW that houses the nation’s sacred founding documents.

Hughes remembered that storm. (There are high water marks noted on the walls in several areas.) So when the alarm was signaled Monday, he thought: “My God. This is trouble.”

He hurried from the control room out to the building’s large loading areas, where the wide driveways sloped steeply down from the rain-swollen street level. He saw that the fiberglass flood barriers had indeed risen.

“Okay, fine,” he said he thought.

“I run on back here,” he said. “By the time I came back, boom, we just lost power.”

Monday morning’s historic drenching of the region brought anxious moments at the majestic stone structure that houses, among other treasures, the Declaration of Independence, the U.S. Constitution and the Bill of Rights.

Water burst through the seal of an opening in a wall where 13,200-volt outside electrical cables entered a huge power “vault” and began spraying onto equipment and the floor.

An Archives contract worker, fearing a short or a fire, pressed the three red emergency shutdown buttons in the room, and the power went off.

In the office of David S. Ferriero, the Archivist of the United States, “the lights went out,” he said Thursday.

“Within two minutes, one of the facilities folks was in my office letting me know what was going on,” he said.

Ferriero had heard the stories about the terrible 2006 flooding, which predated his 2009 appointment. “I was concerned that we were in the same situation,” he said.

He went to check.

“The barriers were deployed,” he said. “Everything was working the way it was supposed to.”

The 82-year-old building was evacuated and remained closed for two days.

But the flood barriers held, and major trouble like that in 2006 was averted, said Timothy Edwards, the facility manager for the building.

The wet electrical equipment was dried out. The hole was resealed, and a metal baffle was installed to redirect any future leak away from the equipment.

The landmark reopened Wednesday and was thronged with tourists.

The Archives and other formidable buildings in Washington’s so-called Federal Triangle sit in a low-lying area of the city astride the remnants of Tiber Creek, which once flowed into the Potomac River.

As a precaution, the Archives building, which was completed in 1937, was built on a giant concrete slab supported by thousands of pilings driven down to bedrock.

“Kind of like a boat,” Edwards said. “I don’t want to say we’re floating, but close to it.”

There is always water seeping into a retention management pit. “We’re regularly pumping ground­water out,” he said.

On the night of June 25 and 26, 2006, a huge storm dumped more than 7 inches of rain on Washington, according to a 2008 report by the National Capital Planning Commission.

Monday’s rain deposited roughly 3.3 inches in a single hour, and at one point it was raining at a rate of 5.04 inches per hour.

But in a six-hour period in 2006, the drenching was so intense that it became the kind of event likely to happen once in 200 years, the commission said.

Rain gushed down the Archives’s sloped driveways on Ninth and Seventh streets, flooding the interior electrical vaults with up to 13 feet of water and knocking out power, Edwards said.

In the newly renovated William G. McGowan Theater, water flowed down the steps, covering the stage and the first two rows of seats, the planning commission reported.

No original records, which are on higher levels of the building, were affected.

Cleanup took three weeks.

In 2009, the Archives installed two self-rising fiberglass flood gates, a system Ferriero said was developed in the Netherlands, in the vulnerable driveways.

Recessed into the surface of the driveway, they automatically rise in flooding situations.

As water flows from the street into the narrow basin that holds them in place, they “float” to partially or fully deploy, Edwards said. “The water raises the wall,” he said.

Fully deployed in their metal brackets, they are about eight feet tall, he said. A pump can remove the water afterward.

The barriers will partially emerge in rain storms several times a year. But on Monday, they rose to their full height for only the second or third time since they were installed, he said. “This was a big rain,” he said.

But he was pleased.

“Everything . . . worked,” he said. “We didn’t have near the damage we could have had.”