GOSHEN — Residents and town officials here are hoping that a court ruling will finally settle a lengthy and often acrimonious quarrel over loose and wandering livestock on Spruce Corner Road.

Hampshire Superior Court Judge C. Jeffrey Kinder last month ordered farmer Cosimo Ferrante to pay the town a fine of $750 for failing to completely remove his animals from Goshen by June 15 per a previous court order.

“This problem has been a recurring one,” Kinder wrote. “Livestock pose a public nuisance and safety risk if allowed to roam uncontrolled. Some sanction is required to reinforce the notion that it is cheaper to mend fences that to defend your actions in Superior Court.”

Neighbors around the 86 Spruce Corner Road property where Ferrante rented space from siblings Timothy and Laura Barrus for months complained of livestock roaming freely — and complained again after a removal order had been issued to Ferrante June 1. In one incident, they said, pigs rooted up the lawn of David and Bertina Richardson.

Ferrante maintained that he had moved his livestock from Goshen into Ashfield onto abutting land also owned by the Barrus family, but that several of his pigs had been “spooked” and escaped their enclosure.

With the town continuing to hear complaints about wandering cows and pigs after the June 15 removal deadline, town officials filed a civil contempt claim June 28 in which they asked the court to fine Ferrante $1,000 a day until he complied with the removal order.

According to Selectman John Judd, the town has racked up more than $10,000 in legal fees trying to resolve the situation.

Kinder denied a request from the town that Ferrante be forced to pay the town’s court costs.

Both Ferrante and a town official expressed optimism that Kinder’s ruling will settle the dispute.

“At least the judge recognized me as a legitimate farmer with rights, and not just some crazy guy with animals in the woods,” Ferrante said.

“We really hope this is the end of it,” Judd said.

Meanwhile, Ferrante says all of his animals are now located in Ashfield. And Select Board secretary Cindy Roberts said the board has received no further complaints regarding Ferrante’s livestock.