A federal appeals court is weighing a challenge to a Virginia law that allows police to arrest "habitual drunkards" and send them to jail for up to a year for possessing alcohol.

A survey conducted by the Legal Aid Justice Center shows that Virginia and Utah are the only states that make it a crime for someone designated as a habitual drunkard to possess, consume or purchase alcohol.

The center is accusing Virginia officials of using the law to punish homeless alcoholics.

A judge dismissed the group's lawsuit last year, but the 4th U.S. Circuit Court of Appeals in Richmond is now considering its appeal.

The state Attorney General's Office argues that Virginia has a legitimate interest in discouraging alcohol and drug abuse, and has the authority to control the sale and possession of alcohol.