An Oregon appeals court agreed Wednesday that a couple must surgically lacerate their dogs’ vocal cords in a procedure known as “debarking” or “devocalization,” following a lawsuit brought by neighbors annoyed by the pets’ “incessant barking.” The ruling upheld a lower court order.

The case began in 2002, when Karen Szewc and John Updegraff began breeding Tibetan Mastiffs, large fluffy dogs often employed to protect sheep from predators, at their home in Rogue River, Ore., about 150 miles south of Eugene.

The married couple’s neighbors, Debra and Dale Krein, quickly grew tired of the dogs’ barking. According to the Kreins, the “dogs bark[ed] uncontrollably for long periods of time while defendants [were] away from the residence,” court documents state.

But they weren’t the first ones to take action against the dog owners. In both 2004 and 2005, Jackson County cited Szewc for violating a county code provision on public nuisance “by allowing two of her dogs to bark frequently and at length,” according to court documents.

Szewc argued the provisions didn’t apply to her because she ran a farm on the couple’s 3.4-acre parcel of land, which includes sheep, goats and chickens. Farms fall under different ordinances.

The Jackson County Circuit Court rejected this argument, saying the property was not a farm, ordered her to pay $400 and to debark the two offending dogs or to move them to a different area.

It is unclear if she debarked these dogs, but in 2012, the Kriens filed a lawsuit against Szewc and Updegraff, claiming they had not taken the necessary actions to prevent the dogs from barking. At that point, there were at least six dogs on the property, all either Tibetan or Pyrenean Mastiffs, the Oregonian reported.

Again, the dog owners argued that they were not subject to the dog barking ordinance because they were running a farm.

The Kreins claimed the dogs often began barking at 5 a.m., sometimes waking the couple. Relatives refused to visit, and their children hated being around the house, according to the Oregonian. They recorded the barking to prove it.

“The dogs are my employees,” Szewc told the Oregonian. “We do not have the dogs to harass the neighbors. We have the dogs to protect our sheep.”

“The next line of defense is a gun. I don’t need to use a gun, if I can protect my sheep with dogs,” she added. “This is a passive way of protecting livestock.”

In April 2015, a jury sided with the Kreins and ordered Szewc and Updegraff to pay them $238,000 in damages. Also in response to the suit, Judge Timothy Gerking ordered the couple to debark the mastiffs, since they hadn’t stopped them from barking using other means such as shock collars.

Szewc and Updegraff again argued unsuccessfully that the dogs were necessary because they had a farm.

On Wednesday, a three-judge panel of the Oregon Court of Appeals consisting of Joel DeVore, Chris Garrett and Bronson James upheld that ruling, agreeing that the dog owners were not running a farm.

The question of whether debarking is an appropriate remedy was not at issue in the case.

Debarking is a surgical procedure in which parts of a dog’s vocal folds or cords are cut out in an effort to lower the volume of its barks or, more severely, to eliminate the dog’s ability to bark altogether, according to the American Veterinary Medical Foundation.

The procedure is partially prohibited in six states, according to the AVMF. Many animal welfare organizations oppose it, as do some veterinarians.

“Debarking is not a medically necessary procedure,” Jeffrey S. Klausner, chief medical officer of the Banfield Pet Hospital, told the New York Times in 2010. “We think it’s not humane to the dogs to put them through the surgery and the pain. We just do not think that it should be performed.”

Wednesday’s ruling left some animal rights activists reeling.

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

More from Morning Mix

Trump and Manafort get big reminder that pardon power does not extend to state crimes

Investors say SeaWorld lied about business downturn after orca outcry. Now feds are investigating.

Evangelicals’ ‘Nashville Statement’ denouncing same-sex marriage is rebuked by city’s mayor

Lesbians win $10,000 judgment against county clerk for calling them an ‘abomination’