Harvey Cedars Mayor Jonathan Oldham was relieved Monday after the state Supreme Court overturned a $375,000 jury award given to Harvey and Phyllis Karan, who complained that a multimillion-dollar beachfill project ruined the view of the oceanfront from their $2 million home.

The ruling faulted a lower court for not allowing jurors to consider the dune's benefits in calculating its effect on property value and that the protective benefits should have been considered along with the loss of the ocean views.

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

During the five years since Harvey Cedars pursued eminent domain to secure easements, jury awards began to trickle in in six-figure amounts.

Monday's ruling comes as officials mobilize to build protective dune systems along New Jersey's 127-mile coastline. Oldham and other officials were concerned about an expensive precedent, with homeowners holding out for large payouts as compensation for lost views.

"This is something we were waiting on for so long, and we're sitting there scratching our heads and wondering when is this going to end," Oldham said.

"We're not selfish or greedy or stealing their land or anything that these people have said about us," Oldham said.

Monday's decision was applauded as a victory by local officials for towns that want to build dune systems in an attempt to protect beaches and homes from disastrous storms.

During Harvey Cedars' eminent domain process, the Karans turned down a $300 offer from the municipality as compensation for their lost ocean views and wanted a trial.

According to the state Supreme Court decision, "the jury awarded the Karans $375,000 in damages, premised mostly on the loss of their oceanfront view," but the decision said "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."

Peter Wegener, an attorney for the Karans, 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.

Oldham credited the beachfill project with protecting the municipality during Hurricane Sandy.

"Before the storm, I was sitting back and wondering did we do the right thing with the eminent domain as I watched the jury awards come in. But after the storm, I knew we did. I believe it with all my heart now," he said.

According to the court's decision, "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 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 decision determined.

Gov. Chris Christie has been critical of oceanfront homeowners who complain about replenished dunes obstructing their view of the ocean. Christie called the Karans' and other similar oceanfront homeowners "knuckleheads" during a recent public meeting on Long Beach Island.

Brigantine Mayor Phil Guenther said the municipality has thankfully not had the same issues as Long Beach Island with completing beach replenishment projects and obtaining easements.

The only issue Brigantine has faced connected to beach replenishment projects that have gone on for decades are the Japanese black pines that grow high on the dunes and can obstruct views, Guenther said.

The latest state Supreme Court decision showed that the courts need to consider the overall public benefit of beach replenishment and shore protection, he said.

"Obviously, the ability to do beach replenishment projects for shore protection and to encourage the growth of dunes is vitally important as we saw with Superstorm Sandy. I believe homeowners in Brigantine see the value of the dunes and they certainly saw that after Sandy," he said.

Wildwood Mayor Ernie Troaino Jr. said Wildwood does not have dunes because the beach is 2,000 feet wide and during Sandy water only reached a few streets. But, he said, for the rest of the towns with smaller beaches, the homeowners should want dunes to protect their properties.

"At least you'll have a view from your property to look out to instead of having to locate your property since it was washed two blocks away," he said. "I would think that (after Hurricane Sandy) that mentality would have changed."

Ventnor Mayor Mike Bagnell said the city's dunes were erected about a dozen years ago and they not only preserve buildings but the Boardwalk that would cost several million dollars to replace.

"Early on, some people had an issue and complained a little bit, but after it worked really well with Sandy, people like it a lot more now," he said.

The Associated Press and Staff writer Joel Landau contributed to this report.