When fire started at the Blue Water Inn on Ogunquit Beach, the area had no working fire hydrant. But by the time firefighters tied into the hydrant across the street from the inn, the water line was carrying almost 1,500 gallons per minute.

Workers from the Kennebunk Water District, having just connected a new stretch of waterline at River Road and Beach Street, saw smoke and heard the alarms at the end of the work day Tuesday. They quickly turned on the valve allowing water to flow down Beach Street and over the bridge.

Foreman Ed Thyng grabbed a wrench and ran the 150 yards to the hydrant across from the burning inn and prepared it for the firefighters, who were quickly exhausting the water they carried on their fire engine.

“In 27 years, I’ve never had a fire where we’ve been working before,” Thyng said.

He said his heart was racing while he removed a 2-inch plastic line that had been providing tap water to the businesses there while the water mains were being worked on. “I know the gentleman that owns the Blue Water Inn and I just felt bad for him. It’s a terrible thing to happen to a nice old building.”

The fire, which destroyed the Blue Water Inn and damaged the adjacent Huckleberry’s restaurant, appears to have started accidentally inside a wall where electrical distribution boxes were located, though investigators on the scene Thursday could not specifically say what malfunctioned, Fire Chief Mark O’Brien.

O’Brien said the initial lack of a working hydrant didn’t hamper efforts to fight the fire. The trucks carry about 1,000 gallons of water, enough for the first firefighters on the scene to get water on the fire, though the supply lasts less than five minutes.

“We use tank water until we’re almost out and then try to establish water from a hydrant as soon as possible,” O’Brien said. “It helps with some initial knockdown or on a smaller fire we can contain or completely put it out, but obviously fires of this magnitude take hundreds of thousands of gallons.”

O’Brien said that as he and his crews were driving down to the fire, the district workers were yelling that the water wasn’t on yet. Usually the department is alerted when a hydrant is out of service, but in this case the department wasn’t aware of it, he said.

“It caused some extra stress and anxiety,” the chief said, though of greater urgency were the high winds fanning the flames, and downed electrical wires which prevented more fire trucks from pulling up in front of the inn.

Firefighters were able to use the hydrant when they needed it, but they also drew water from the river over the railing of the bridge and laid a supply line to a 16-inch water main on Route 1.

The four-alarm fire started about 6:30 p.m. and was under control about four hours later.

Once firefighters started using the hydrant across from the inn, they were getting more water than would have flowed through it just two days earlier. That’s because the Kennebunk Water District had just replaced a 100-year-old, 6-inch, corroded metal line with a new, 8-inch plastic line capable of carrying about 50 percent more water.

The district, which provides water service to seven towns in coastal York County, is replacing old water lines in Ogunquit while the Maine Department of Transportation is in the midst of a multi-million dollar road project on Route 1.

Norm Labbe, superintendent of the Kennebunk Water District, said that it was unfortunate the fire occurred in an area where water main work was underway, but fortunate that it didn’t happen earlier in the day when the line was disconnected. Also, the tide would have been out, making it harder for the department to draw water from the river, he said.

“If that had happened a few hours earlier, there would have been no water available,” Labbe said. “It was like a perfect storm in a way, but fortunately we happened to be able to turn the new main on in that instant.”

He rejected rumors that the water main work had left firefighters with little water to fight the fire, contributing to the inn’s destruction.

“The initial response to the fire was not hindered by anything being done by us,” he said. “They had a hydrant with the best flow they’ve ever seen (there), at the fire.”

The seven-room inn was a landmark, just off the bridge that leads from the downtown shopping area to the small resort area of Ogunquit Beach.

The town hopes to have the burned-out buildings removed as soon as possible, and that work might get started next week, once insurance companies and their investigators are finished, O’Brien said.

“It’s probably going to be weeks before it’s completely torn down,” he said.