A federal judge in Alexandria yesterday threw out a constitutional challenge to a new Virginia law that seeks to ban online commercial material that could be considered harmful to minors.

U.S. District Judge Claude M. Hilton approved the motion to dismiss the lawsuit on narrow grounds. He found that the plaintiffs--a coalition of civil rights advocates and Internet businesses--had sued the wrong people.

Hilton ruled that the defendants--Virginia Gov. James S. Gilmore III (R) and state Attorney General Mark L. Earley (R)--do not have a close enough relationship to the enforcement of the law, which went into effect in July.

Larry Ottinger, an attorney for People for the American Way and 15 other plaintiffs, said the group plans to refile the lawsuit and address Hilton's objections by naming at least one commonwealth's attorney as a defendant.

The plaintiffs include Herndon-based Internet service provider PSINet, Lambda Rising bookstores and the author Harlan Ellison.

Hilton's ruling did not address the constitutionality of the law, which makes it a crime to use the Internet to knowingly sell, rent or lend to a juvenile sexually explicit pictures or written narratives that could be harmful to minors. The law, which was enacted in April over Gilmore's objections, also makes it a misdemeanor to display the information in a way that juveniles could peruse it.

The plaintiffs contend that the law violates adults' free-speech rights because it is so difficult to control access on the Internet.

The Internet service providers who joined the suit said they are concerned the statute would make them liable for information accessed by customers. But David Botkins, a spokesman for Earley, said the law would not be enforced against such companies.