The most certain thing one can say about the abrupt eviction of residents of Walden Eco-Village in Peterborough last week is that the timing was awful, and those hardest hit were the residents.

The residents were ordered out by the town, after an inspection by Code Enforcement Officer Tim Herlihy and fire officials showed the original seven small cabins allowed there had evolved in ways neither safe nor sanctioned by local zoning and building codes.

Herlihy found as many as 25 people now living in what started roughly 15 years ago as temporary housing for staff at the nearby Well School. According to town reports, property owner Akhil Garland, a former Well School director, was granted a variance to build the original cottages to house school staff and others connected to the school, presumably while they sought permanent housing in the area.

In a press release, Deputy Town Administrator Nicole MacStay said the variance required the buildings to be related to the school, and any new structures to go through a permitting process. The approval was for six housing cabins with no electricity or kitchen or bath facilities, and a seventh common building that offered those amenities.

Over the years, it appears, Garland has shifted the focus of the settlement. He added, the town says, 15 buildings, including an additional seven “casitas” — not-quite “tiny” houses. He’s also been marketing the neighborhood as the name implies, as a rustic, sustainability-minded community.

That all occurred somewhat under the radar, although MacStay’s release noted that since the original approval, “there has been some knowledge of the more permanent use of (the original cottages) as residences.”

To Garland’s credit, he attempted to gain town permission for a planned further expansion, filing a site plan in July to convert the seven cottages into single-family homes and build 19 additional structures. At a July hearing, Garland told the planning board that over the years, he’d started allowing people unconnected to the school to reside there because of the town’s high taxes and shortage of housing. Board members acknowledged the town hadn’t kept on top of the situation.

When, earlier this month, Herlihy went to inspect the site, he found unpermitted or inspected propane and electrical connections, including extension cords running between buildings. Some of the casitas had unsafe holes in the floors, walls or ceilings, and they lacked proper heating.

Citing the unsafe conditions and lack of permits, the town ordered the buildings vacated by Dec. 16, and charged Garland with finding accommodations for the displaced tenants. The residents who’ve spoken on the issue have seemed understandably stunned and defeated at losing their homes right before the holidays. Some have blamed the town, some the landlord. Surely, there is blame to be had.

There seems little doubt Garland violated his variance and built out the casitas without permission, permits or required inspections. He endangered his tenants by providing unauthorized electrical and propane connections, fire officials say. At the same time, it appears people in town knew the community was growing, and that not everyone there was, as mandated, part of the school staff. At the very least, it’s worth asking why, with a proposed plan and indications in July that the variance hadn’t been adhered to, officials waited until December to inspect the property.

Those issue will undoubtedly be heard, either before town boards or in court. However, the overriding takeaway from the situation is sadness at the unfortunate timing and the need to oust the residents. The fire, electrical and gas dangers, once known, required the town to act as it did. But that’s little solace for those left scrambling for new homes with less than a week’s notice.

We’d add the underlying dynamic here is that the village thrived, as Garland noted, in part because of the lack of affordable housing alternatives. Properly executed in adherence to codes, the type of set-up he created could have potential for those needing little actual living space and a sense of community.