“This is an extremely technical case,” Tobias said.

The plaintiffs argued that the law is focused on a tiny subset of Virginia’s population, which has an estimated 500,000 alcoholics, most of them not homeless, while only 1,220 people were interdicted in the state over a nine-year period ending in October 2015.

Over the same period, Virginia recorded 4,743 convictions of interdicted people, suggesting the same people are repeatedly prosecuted.

The four named plaintiffs — from Richmond and Roanoke — have been arrested and prosecuted between 11 and more than 30 times, the plaintiffs said. A violation is punishable by up to 12 months in jail.

It is effectively a status crime because they are being targeted for being homeless, they argue.

The Virginia attorney general’s office defended the law, arguing that the state has a legitimate interest in curbing alcoholism and its associated conduct that jeopardizes the safety and welfare of alcoholics and those who come into contact with them.

A spokesman for the attorney general’s office said Tuesday, “We’ll take the time needed to review the court’s decision before deciding how best to proceed.”