HARVEY CEDARS, N.J. (AP) — New Jersey’s highest court on Monday overturned a $375,000 jury award given to an elderly couple who complained that a protective sand dune behind their house blocked their ocean views.

In a ruling seen as a wider victory for towns that want to build barriers to protect themselves from catastrophic storms, the state Supreme Court faulted a lower court for not allowing jurors to consider the dune’s benefits in calculating its effect on property value. The high court ruled that those protective benefits should have been considered along with the loss of the ocean views.

The sand dune in question saved the elderly couple’s home from destruction in Superstorm Sandy in October.

The 5-year-old case is being closely watched at the Jersey shore, which was battered by Sandy. Officials want to build protective dune systems along the state’s entire 127-mile coastline, but towns fear they won’t be able to if many homeowners hold out for large payouts as compensation for lost views.

“Had we lost this case, I think beach replenishment would have been (over) in New Jersey,” Harvey Cedars Mayor Jonathan Oldham said. “We’re very pleased with the court’s ruling and look forward to competing with a fair set of rules. I’m happy for the whole island.”

The homeowners, Harvey and Phyllis Karan, had rejected the town’s offer of $300 in compensation for their lost views and insisted on a trial. Their Long Beach Island home is worth close to $2 million.

“Although the jury found that the Karans’ property decreased in value because the dune obstructed their view, a buyer would likely also consider the value provided by the dune in shielding the property from destruction,” the court wrote in its opinion. “The court did not allow the jury to consider evidence that the dunes — constructed at public expense to protect the island’s homes from minor and catastrophic storms— enhanced the value of the Karans’ property.

“The jury awarded the Karans $375,000 in damages, premised mostly on the loss of their oceanfront view,” the justices wrote. “Homeowners are entitled to the fair market value of their loss, not to a windfall, not to a payout that disregards the home’s enhanced value resulting from a public project.”

The court said a new trial is needed where jurors would be told to also consider the dune’s benefits. There was no immediate indication when a new trial might be held.

Gov. Chris Christie has repeatedly ridiculed homeowners’ complaints about dunes blocking their views and called the Karans’ and others in their circumstances “knuckleheads” during a recent public meeting on Long Beach Island. The state is trying to get oceanfront property owners all along the coast to sign easements allowing the government access to small strips of their land to carry out the dune projects.

“The Supreme Court’s decision embraces what Gov. Christie has been arguing ever since Sandy: that oceanfront properties protected from destruction are safer and more valuable than those that are not,” Christie spokesman Michael Drewniak said.

Government-funded dune systems “benefit everyone, including holdouts who selfishly refuse to provide easements to protect not just their own homes but the homes and businesses inland of them as well,” Drewniak said. “Those holdouts are the greatest beneficiaries of dune systems and are not entitled to a windfall at the public’s expense.”

Peter Wegener, an attorney for the Karans, argued before the court that the view is a valuable commodity that figures prominently in the selling prices of homes near the beach. He said he was not surprised at the outcome, given the skepticism several of the justices voiced toward the Karans’ legal position during oral arguments in May.

“It seems to sweep away 150 years of jurisprudence in an attempt to reach a solution to a political problem,” he said of the ruling. “Obviously the impact of the storm had a big impact on the court’s opinion.”

Neither Wegener nor Oldham, the Harvey Cedars mayor, could say whether the ruling might help or harm the chances of a negotiated settlement in the case.

Jeff Tittel, director of the New Jersey Sierra Club, hailed the ruling as an important step toward safeguarding the Jersey shore, parts of which remain vulnerable to future storms.

“Many of the areas without dunes got devastated, with these areas now wanting money to rebuild, but still do not want to put in dunes,” he said. “We cannot rebuild the shore smarter and better without building dunes, so this decision is important on how we rebuild our coast and natural systems.”