Through decades of ups-and-downs, bourbon production at Buffalo Trace Distillery has been connected to the Kentucky River — summed up as a blessing and curse by a plaque on the historic grounds.

In the 1800s, long before the Buffalo Trace name was attached to the distillery, the river served as a floating highway to bring in grain and other essentials for production and to transport barrels of whiskey to markets along the Ohio and Mississippi rivers. Even today, river water cools down production equipment. But the river flowing past the distillery flashed its destructive side in April.

A massive flood, caused by days of unrelenting rain, sent the Kentucky River surging over its banks, inundating most of the 200-plus-acre distillery grounds on its main campus in Frankfort. Nearly every phase of production was impacted, as were several warehouses where whiskey was stored for aging.

“It was just something that was hard to process but we knew we couldn’t take too much time to process it," said Tyler Adams, a distillery general manager. "There were a lot of steps that needed to happen” to recover from the reservoir of murky water that covered the bourbon-making campus.

Five months later, production is back to normal at the distillery — which crafts some of the most sought-after bourbons — and new milestones have been achieved. Its lineup includes the namesake flagship brand, Buffalo Trace, as well as Eagle Rare, W.L. Weller and Blanton's. Pappy Van Winkle bourbons are distilled and aged at Buffalo Trace while the Van Winkle family remains in control of the coveted brand.

The distillery recently filled its 9 millionth barrel of bourbon since Prohibition, just two and a half years since filling the 8 millionth barrel. New whiskeys have been introduced to the distillery's catalogue and a campus building is being renovated into a cafe and events center.

The cleanup enlisted hundreds of plant employees and contract workers. Buffalo Trace fans swamped the distillery with offers to pitch in, Adams said recently. The distillery politely declined and suggested they might assist area residents. Crews at the distillery removed debris, sanitized equipment and pumped out pools of water left once the floodwaters receded. Bourbon barrels swept into the parking lot caught the eye of onlookers, Adams said. No chance for sneak samples, though. The barrels were empty.

Few visible reminders still exist of that mud-caked, debris-strewn mess.

Some filled whiskey barrels touched by floodwaters were still being cleaned and tested, but the meticulous task of examining thousands of barrels was nearly complete, the distillery says. Quality control assessments found only small amounts of aging whiskey were impacted, it says. Elsewhere, high water marks are etched into some buildings and tour guides casually remind visitors of the epic event.

Danny Kahn, a master distiller for Sazerac, the distillery’s owner, says he still experiences "a little PTSD” when recalling those frantic days. River flooding has been a sporadic part of the distillery's history — including big ones in 1937 and 1978 — but in early April, the floodwaters surged to heights never experienced in parts of the venerable distillery. The flood came months after Buffalo Trace completed a decade-long, $1.2 billion expansion to double distilling capacity,

“It actually looked kind of calm, but I knew that it was not calm because we could see buildings were under 10 feet of water," Kahn said recently. "It was really quite overwhelming.”

Activating their flood plans, workers shut down the distillery and did what they could to safeguard equipment from the rising water. After that, all they could do was watch and wait. Distillery officials observed from higher ground, aided by drone footage to monitor the devastation below.

Once the river crested, it took a few days for the floodwaters to fully recede, but operations gradually sprung back to life. Finished whiskey shipped out the day after the rain stopped. Bottling soon resumed and a makeshift gift shop opened until the visitors' center was repaired. Tours eventually resumed. But bourbon production halted for about a month as the cost for cleanup and repairs surpassed $30 million.

Several storage tanks shifted off their foundation. Some were repaired, others replaced. Dozens of electrical control panels were destroyed. About three-fourths of gift shop inventory was lost.

“It was just defeating to watch all this flooding and to realize that we’re going to be down for a while," Kahn said. “Just the apprehension of how much work this is going to be to fix. And when we finally got it done, it was really a sigh of relief and we get back to business as normal."

AP Video shot by Dylan Lovan