A couple in Oregon must surgically remove their dogs’ vocal cords in a procedure known as “debarking” after their neighbors complained the incessant noise had disrupted their lives for more than a decade, an appeals court ruled.

The Oregon Court of Appeals ruled Wednesday that the procedure, which is outlawed in six states under certain circumstances, is the answer to quiet at least six Tibetan and Pyrenean Mastiffs owned by Karen Szewc and John Updegraff on their rural property outside Grants Pass in southern Oregon, The Oregonian reports.

The relentless barking, according to the couple’s neighbors, Debra and Dale Krein, began in 2002, but the couple didn’t sue until 2012, according to a summary of the case cited by the newspaper. The barking started as early as 5 a.m., the Kreins claimed, and continued for hours and hours after their owners left the home in the morning.

The endless barking even kept relatives from visting the Kreins, regularly woke them up in the morning and even made their children’s return home after a day at school a foreboding experience, they claimed.

In 2015, a jury ordered that Szewc and Updegraff pay the Kreins $238,000 after a four-day trial in Jackson County Circuit Court. But while the Kreins said the ruling compensating them for years of incessant noise, they claimed it didn’t silence the issue.

That resonated with Judge Timothy Gerking, who ordered that the dogs be debarked, a surgical procedure also known as devocalization that’s performed under general anesthesia to cut out varying amounts of the dog’s vocal cords.

The surgical procedure, according to the American Veterinary Medical Association, can lead to complications and is banned in six states under certain circumstances, including in Massachusetts, Maryland and New Jersey, where it’s prohibited unless a veterinarian determines it to be medically necessary.

Aside from the risks associated with general anesthesia, devocalization can lead to bleeding, acute airway swelling, infection, coughing and aspiration pneumonia. And it’s possible the surgery won’t even be a success, as a near-normal bark can return in some animals within months, according to veterinary association.

“We are just shocked,” David Lytle, a spokesman for the Oregon Humane Society, told The Oregonian.

The organization backed a bill a few years ago to ban the surgeries in the state, but the effort failed, Lytle said.

On Wednesday, the Appeals Court upheld the $238,000 verdict and Gerking’s order to debark the dogs, which their owners had unsuccessfully argued were vital to running their farm.

Debra Klein declined to comment when reached by The Oregonian and an attorney for the couple could not be reached for comment.

Szewc, meanwhile, said the dogs are her “employees” and that the ruling will impact the couple’s ability to operate their farm of sheep, goats and chickens, which supplements their income, she said.

“We do not have the dogs to harass the neighbors,” she told the newspaper. “We have the dogs to protect our sheep.”