Aerial view looking south across the Anacostia River during the flooding of the Potomac River in October 1942. (Library of Congress)

They worked in the rain by the light of flood lamps.

Hundreds of soldiers and civilians frantically filled sandbags, while bulldozers and cranes helped build the dike at 17th Street and Constitution Avenue in Washington.

They were trying to hold back the tidal wave surging down the Potomac River from the highlands. And time was short.

The Red Cross brought coffee and soup, and President Franklin D. Roosevelt visited. He told officials: “Spare no effort or expense to protect the Capital.”

It was Oct. 16, 1942, and as the United States battled the Japanese in the Pacific, wartime Washington was fighting what was perhaps the greatest flood in its history.

The National Oceanic and Atmospheric Administration (NOAA) says 1942 holds the record, measured at the southwest waterfront, followed closely by the monster flood of 1936. Old news accounts agree.

The 1942 flood was brought on by 5.4 inches of rain that fell in Washington over 77 hours in the third week of October.

Added to that was 12 inches that fell over the Shenandoah Valley, and 18.9 inches in a 12-hour period at Big Meadows in the Blue Ridge Mountains of Virginia on Oct. 17, according to a 1956 federal government hurricane research study.

The result was a crest that rumbled down the Potomac River, and peaked at 17.7 feet at the flood gauge at the Key Bridge, according to James Lee, the meteorologist in charge at the National Weather Service station in Sterling, Va.

Hurricane Florence seen from the International Space Station.

As Hurricane Florence threatens a vast area across the East, including the already soaked Washington region, with days of torrential rain, a look back shows how a different Washington coped with a similar inundation.

On Oct. 12, 1942, the remnants of a tropical system came ashore over North Carolina’s Outer Banks at Cape Hatteras, headed inland and stalled, Lee said.

While not nearly a hurricane, this storm probably caused the massive flooding in the Washington region, he said. “This is what I believe happened,” he said. The 1956 study concurred.

Today, as the region braces for the worst, the National Park Service has a modern, $4.5 million levee system for 17th Street, below Constitution Avenue, just north of the World War II Memorial. (Officials are watching to see whether conditions warrant its deployment.)

In 1942, Washington had the war itself, and a crude procedure of erecting a six-foot-high dike of dirt and sandbags that spanned 17th Street, where water flowed north from the Tidal Basin.

Eight hundred soldiers and 300 civilian workers were turned out in what sounds like an epic struggle to hold back the flood, according to The Washington Post.

Scores of trucks brought in dirt to fill the sandbags, while steam shovels and fire pumps helped out.

“As the water crept up, inch by inch, bulldozers were thrown into the fight and the entire area around the Navy Building became a scene of fevered activity,” wrote Thomas McBride, of The Post’s staff.

In October 1941, workers build what was then called the War Department Building and later named the Pentagon.

Back then, that area of the Mall was crowded with World War I-era government buildings, including the Main Navy Building, on the southwest corner of 17th and Constitution. (The Pentagon was still under construction.)

The flood wrecked landscapes in its path and killed several people, including a courageous tow truck driver named John E. Buell, 31, of Bethesda.

He was the chief of the Bethesda Volunteer Fire Department and ran an auto repair shop on Wisconsin Avenue.

His wife had asked him to stay home that night. “I can’t. There’s too many people depending on me,” he replied, according to The Post’s story the next day.

He had gone out into the storm in his tow truck to pull stranded cars out of the water.

On River Road, near Cabin John Creek, he spotted a car almost submerged. With a helper, Hammond Tressler, Buell attached a tow line to the car and told Tressler to start the winch. As the rope tightened, Buell and the car were suddenly swept away into the swollen creek.

His body was found about 200 yards away wedged against a rock.

Near Canal and Reservoir roads, several B & O freight cars were washed into the Potomac when the track bed gave way.

Upriver, by Harrison Island near Leesburg, Va., five members of the U.S. Coast Guard had to be rescued when their attempted rescue of a man and his son believed to be stranded in a barn on the island went awry, according to The Post.

A Coast Guard rescue boat trying to reach the island capsized in the torrent, and the rescuers clung to tree branches to survive. They were eventually saved. But when other rescuers finally reached the man and his son, they declined to be rescued.

They said they were guarding 100 head of cattle in the barn.

Elsewhere along the Potomac, many people were evacuated from their homes, although some refused to leave. “They’d gone through the ’36 flood, they said, and they were ready to go through this one,” McBride, the reporter, wrote.

In Washington, water surrounded the new $3 million Jefferson Memorial, which was largely finished but would not be dedicated until the following spring.

Much of the Washington Navy Yard was flooded. And the phone company asked people to stay off the lines.

A foot and a half of water covered Maine Avenue at the storm’s height, and hundreds of homes in Georgetown were flooded, according to NOAA.

In Virginia, Fredericksburg was hit especially hard by the surging Rappahannock River. Two large gasoline storage tanks caught fire. Power was out, and drinking water was in short supply.

Residents navigated the streets by boat and canoe, according to a film on YouTube, “Fredericksburg Flood of 1942,” posted by Jim Gaston. And cars were submerged up to their windshields. Across the river, parts of Falmouth were devastated.

As the water ebbed in Washington, the sandbag dike held. The sun came out. And cleanups began.

Lee, the meteorologist, noted that the Washington area is again saturated from recent rains, and “if we get ten inches” from Florence, we could easily revisit 1942.

Read more:

‘Beyond rescue’: Ellicott City’s bizarre, rainless flood and its deadly 20-foot wall of water

A historic Maryland flood uncovers a secret cave and a mystery: What was it used for?

Houston’s besieged dams were built 70 years ago after this 1935 flood devastated the city