A historic building on the waterfront in St. Andrews has been spared from demolition.

The owners of Cottage Craft woollen shop and the town have been fighting for years about whether the building is a danger to the public.

But Justice William T. Grant of the Court of Queen's Bench ruled Thursday it would be "premature" to order that the building be torn down.

The ruling gives owners Evan and Michelle Ross more time to make repairs.

Grant's ruling said the owners were "entitled" to that time. But the judge also said there are legitimate concerns with the building.

Cottage Craft

The Cottage Craft building in St. Andrews sits on a wharf in a tidal zone. (CBC)

Cottage Craft sits on a wharf of a tidal zone in the historic district of the seaside town.

The building has been off limits to the public since December.

In November 2010 the building was battered in a heavy storm. The town's building inspector ordered the Rosses to hire an engineer to inspect the piles and beams supporting the building.

The owners have produced letters from an engineer that state the building is not a threat to public safety.

But the town's lawyer said in court Thursday that the same engineer has never completed a full structural analysis.

Evan Ross says the town is being unreasonable and vengeful.

Ross estimates he needs $3,500 worth of repairs to meet the town's demands. The town put evidence before the judge Thursday estimating the repairs needed will cost more like $120,000.

The parties now appear to be at a stalemate.

The Rosses need a building permit to address the problems, but the town won't issue one.

The court case has been adjourned with no date set for the next hearing.