A dramatic flood event unfolded in Frederick, Md., Tuesday night as intense line of thunderstorms unloaded up to half a foot of rain and baseball-size hail in just over two hours. The floodwaters inundated roads, homes and businesses and forced multiple water rescues.

Storms lined up along an east-west axis across northern Maryland from 5 to 11 p.m. Torrential rain was associated with this band of thunderstorms that moved south into the region from Pennsylvania. When the line of storms arrived in Maryland, it stalled.

The heaviest rainfall, to the tune of over 6 inches, focused over the Frederick-Burkittsville region. That total comes from radar analysis, with the caveat that it often underestimates extreme rainfall as distance from the radar (located in Sterling, Va.) increases. It is conceivable the total could be upward of 7 to 8 inches.

While Frederick itself received amounts closer to 4 inches (radar estimated), the short delivery time quickly overwhelmed the soil’s ability to absorb the water. In fact, the impervious surfaces (roads, parking lots, rooftops) contribute greatly to flash-flood vulnerability; this is true of any sizable urban or suburban region.

The source of this week’s severe weather is a stalled front that has bounced between Virginia and Pennsylvania. On Tuesday, the front dropped just south of the Mason-Dixon Line. Cool air lay to the north of the boundary; hot and very humid air, to the south.

Along this front, a small area of low pressure developed over north-central Maryland during the late afternoon. Air began streaming toward the low pressure region from all directions, as shown in the graphic below. This convergence of air led to a chimney of rapidly rising, moist air directly over the greater Frederick region.

Meanwhile, a line of severe thunderstorms advanced south across Pennsylvania, along the front. Around 6 p.m., the line reached the northern Maryland border, while elements of a new line began coalescing over northwestern Virginia. Deep convection was closing in on central Maryland from multiple directions.

Forecasters knew the potential for flash flooding across Maryland was high. First, the humidity level of the lower atmosphere was on the rise, and a corridor of very moist air became established along the Virginia-Maryland piedmont. Like a conveyor belt, moisture was riding winds out of the south, feeding directly into thunderstorms.

Additionally, the heat and moisture was significantly destabilizing the atmosphere. A vast amount of pent-up energy was building over the northern Virginia-central Maryland region, with a bull’s eye over Washington. The energy reached extreme levels seldom seen here.

In the diagram below, that maximum is readily apparent, using a parameter called “lifted index.” The little number (minus-9 Celsius over Washington) means rising air would be 18 degrees Fahrenheit warmer than its surroundings, halfway up the troposphere. Like heating the inside of a hot-air balloon, the air will have a tendency to rise further, and quite rapidly, forming deep thunderstorm clouds approaching 50,000 feet.

The aforementioned factors — a converging air pattern, piles of moisture and explosive instability — set the large scale stage for significant flooding. But focusing on the Frederick region, where this flood actually unfolded, requires a look at the dynamics of the storm line.

The band of thunderstorms was oriented west to east and was advancing south of the Mason-Dixon Line. After 6 p.m., the advancement of the storms slowed, and then the band became nearly stationary. New cells began erupting over Frederick, along the western end of the band.

As these cells bubbled up, swift winds in the middle atmosphere shuttled these cells toward the east. This cycle continued for the next three hours: New cells erupt over Frederick, dump heavy rain and stream toward the east.

This process of repeated cell passage over the same locations is called echo training and is something we specifically mentioned was possible in our forecast earlier that day. (Exactly where this setup would unfold, however, was nearly impossible to ascertain hours in advance).

The rain cells were most vigorous at the initiation point, near Frederick; the baseball-size hail that also fell there is testimony to the strength of those updrafts. At one point, the entire convective band was “backbuilding” toward the west.

You can get a sense of this dynamic “conveyor belt” by watching the following rapid-scan satellite movie, courtesy of the NOAA GOES 16 satellite. Cells continuously bubble up over the same location (Frederick) and then ripple eastward, decaying north of Baltimore.

What resulted for several hours was a remarkably efficient, heavy rain-generating machine. Something similar to this happened over Ellicott City in July 2016.

The sobering reality is the exact location and timing of these often-deadly flash floods, caused by summertime convection, are nearly impossible to predict even an hour or two beforehand. Lead time is virtually nonexistent, requiring everyone in the meteorological and hydrological communities to react, rather than proactively getting out ahead.

Capital Weather Gang’s Jason Samenow contributed to this report.