The flooding that destroyed tens of thousands of dollars in inventory in downtown basements on Tuesday was caused by an underground pipe that failed decades before it should have, district water officials said.

The 6-inch iron pipe that burst in front of 46 Main St. was installed about 30 years ago, meaning that it ought to have had as many as 70 more years, said Kathy Moriarty, general manager of the Bangor Water District. Its failure was likely caused by an “imperfection in the pipe or manufacturing process.” It could have also been punctured by a rock when the ground shifted.

“It’s unusual for a 32-year-old pipe to fail,” she said, adding that the average life of a pipe is about 100 years. “It shouldn’t have failed,” she said.

Water levels had receded enough by Wednesday morning for some business owners to begin digging through their basements to assess the damage. Others were already talking with professional cleaners and insurance adjusters.

Repair crews responded to two breaks Tuesday morning — one on Main Street and another on Maine Avenue — and worked into the night. District water officials first thought the flooding on Main Street was caused by a broken water main. It turned out to be a cracked pipe connected to the water main. The pipe that failed on Maine Avenue near the Bangor campus of the University of Maine at Augusta was installed in the 1940s, Moriarty said.

Underground water mains and pipes — especially old ones — often break when the ground freezes and shifts, said Bangor Water District Inspector Pat Smith. Bangor has repaired close to 30 broken pipes so far this winter, Smith added.

The Main Street break flooded buildings on the east side of the street from Nocturnem Draft Haus to Paddy Murphy’s. On Maine Avenue, three buildings at the university were closed on Tuesday and without water.

Businesses in the Standard Shoe Building — which includes Nocturnem and Gerald Winters & Son rare bookstore — appeared to have sustained the most damage, along with Treworgy & Baldacci law offices next door.

Gene Beck, owner of Nocturnem, said Wednesday that he had 7,000 bottles of beer worth about $50,000 in his basement when it flooded. Most of that beer will have to be thrown away, he said, because he has to consider it contaminated. Beck said electronics, refrigerators and freezers were also ruined.

Winters’ basement had the vast majority of his inventory, including countless editions of Stephen King books and rarer items, like King’s original manuscripts. Winters expects damages to rise to six figures.

The broken pipe on Main Street connected to a water main that dates from 1910 and is on the city’s docket for replacement, Moriarty said.

“We have a challenge because we have 200 miles of pipe and about 60 miles of it is over 100 years old,” she said.

Replacing a single mile of pipe costs about $1.5 million.

“We really need to invest the money to get these old pipes renewed,” Moriarty said, “But it’s going to take a long time and a lot of money.”

Follow the Bangor Daily News on Facebook for the latest Maine news.