Jim Medeiros and his wife were startled a decade ago when they heard 20 hunting dogs barking and howling as they circled their house and chased their chickens on their 143-acre (58-hectare) cattle and poultry farm in rural Virginia.

When Medeiros confronted a nearby hunter, the man informed him that he had permission to hunt on Medeiros’ land. Medeiros called the agency that enforces a state law that allows hunters to retrieve their hunting dogs from private property even if the property owners object.

After years of putting up with baying dogs and dead chickens, Medeiros and several other property owners are suing the state over its “right to retrieve” law, claiming that allowing hunters to go on their property without permission amounts to an uncompensated taking and violates the state and federal constitutions.

In certain circumstances, such as when there are no “no trespassing” signs, a number of states allow hunters to retrieve their dogs without obtaining permission from property owners. However, according to Virginia law, hunters are permitted to retrieve dogs even if the property owner has expressly denied access.

According to a 2016 report prepared by the Virginia Department of Game and Inland Fisheries (now the Department of Wildlife Resources), Minnesota was the only other state with a similar law. According to Minnesota law, a person can enter private land to retrieve a hunting dog without the owner’s permission, but they cannot have a firearm with them and must leave immediately after recovering the dog.

The property owners in Virginia are suing the Department of Wildlife Resources, which enforces the law. They are represented by the Pacific Legal Foundation, a conservative legal organization that recently won a major property rights case before the United States Supreme Court. According to the court’s precedents, a California regulation requiring agricultural businesses to allow union organizers onto their property for up to three hours per day, 120 days per year, amounts to the government appropriating “a right of access to private property” and “constitutes a per se physical taking.”

According to Daniel Woislaw of the Pacific Legal Foundation, Virginia’s “right to retrieve” law amounts to a similar physical taking of private property.

The law was passed in 1938, but the tradition of dog hunting dates back 400 years to colonial times, according to Kirby Burch, a bear hunter who owns eight hunting dogs and is the chief executive officer of the Virginia Hunting Dog Alliance, a political action committee that represents about 90,000 hunters in the state. According to Burch, most hunters try to be respectful of landowners by quickly retrieving their dogs when they cross onto private property.

“A lot of people who move here from other states are offended by the idea of hunting with dogs, so when a dog runs across their property, they’re offended, and I understand that,” said Burch, 75, who has been hunting with dogs since he was 5 years old.

Burch’s group estimates that more than half of Virginia’s 254,000 licensed hunters hunt with dogs.

The lawsuit requests that the court issue a judgment declaring that the law takes the plaintiffs’ private property without compensation for public use, which is a violation of both the state constitution and the Fifth Amendment to the United States Constitution.

Several attempts in the legislature have been made to overturn the law, but none have been successful.

The Department of Wildlife Resources’ executive director, Ryan Brown, declined to comment on the lawsuit. Hunters and private landowners have been able to coexist peacefully for the most part, according to Brown, but as more rural land has been developed and Virginia has become more suburbanized, the two groups have been at odds over the hunting dog issue.