Only days before Halloween, the iconic Witch’s Hat, an iconic roadside structure on Main Road in Aquebogue, was dedicated on Saturday.

The building, an official town landmark originally known as “The Lighthouse,” has undergone an 18-month rehabilitation in an effort spearheaded by the Riverhead Landmarks Preservation Committee and the Save Main Road civic group.

“For such a small structure, it’s been a massive & challenging effort — literally a labor of love on the part of the many contractors, suppliers, and volunteers who have worked more than a year to bring it back,” said a release announcing Saturday’s event. Those volunteers, the release added, “contributed their expertise, services, materials, and elbow grease to make this happen.”

Property owner Dr. Richard Hanusch, DVM, was also thanked for his stewardship and patience, said project manager Richard Wines, chairman of the landmarks preservation commission.

Restoring the Witch’s Hat, said co-project manager Cliff Baldwin, was a labor of love. “”It’s fantastic. It’s an icon for the real North Fork, an architectural gem. The Witch’s Hat is the North Fork’s answer to the Big Duck.”

Hanush said the revamp, which includes paint and new cedar shingles, breathed new life into the structure. “I love it, it’s great. It looks better than it did when we bought it 25 years ago.”

The timing, said Larry Simms of the Save Main Road civic group, could not have been better. “How could we not have it ready for Halloween?”

Improvements to the structure include the rehabilitation of a light at the tip of the “Witch’s Hat,” which has been restored and will now be illuminated, for the first time in half century, with a modern twist — the light has the capacity to turn different colors, much like the Empire State Building. New electricity has been installed in the Witch’s Hat, as well.

No plans are currently in place to use the building for any specific purpose, Hanusch said, adding that due to the heavy traffic on Main Road, adding any type of attraction in the building could spark accidents caused by rubber neckers. In past years, the Witch’s Hat, once owned by Dr. Gary Brown, was used for wedding photos and a photo shoot for a professional guitarist, he said.

“There are two kinds of people,” Simms said. “Those who love the Witch’s Hat and those who haven’t seen it yet.”

The project, he said, was a testament to the structure’s importance to residents. “It’s really neat to see the community come together,” he said, adding the project used absolutely no public funds.

Wines gave a history of the Witch’s Hat, originally build as a retirement project by Brooklyn-born Harry Fleming in 1927 to 1928. Fleming, an immigrant from England who’d worked as a machinist and his wife Lena, a midwife, as well as her mother-in-law, ran the tiny shop, which originally sold candy, cigarettes, gas and ice cream, a rarity during a time with little refrigeration, for which enthusiasts would come from as far away as Greenport.

With the advent of automobiles, Wines said the building was designed in the shape of a Witch’s Hat to attract the attention of passing motorists. “It’s roadside architecture,” he said.

Later, the Witch’s Hat was used as a nursery and for plant sales. Georgette Keller of the Save Main Road Group said some of the signs have been found and preserved.

The property has been unoccupied since before 1970, although Dr. Brown, who first owned the veterinary clinic on the site, re-glazed the windows and restored the exterior around the time when the structure was designated a town landmark in 1987.

The Witch’s Hat, said Keller, was called “The Tooth Fairy’s House” by Suffolk County Legislator Al Krupski’s family. He told her that when he was a little boy, they’d see the Witch’s Hat and know — as have so many others who consider the Witch’s Hat a beacon — that they were almost home.