NEW YORK (AP) — A federal appeals court says day laborers in a Long Island town have a First Amendment right to solicit passing drivers for jobs.

The 2nd U.S. Circuit Court of Appeals on Tuesday struck down a 2009 law banning the solicitation in Oyster Bay. The law had never been enforced.

Two judges on a three-judge panel say the law seemed written to stop the workers from seeking jobs from motorists on a four-block section of the suburban New York town's roads.

The law was passed after residents complained that up to 50 day laborers each day were causing dangerous, congestive, unhygienic and unsightly conditions.

Oyster Bay says it will appeal to the U.S. Supreme court.

In a dissent, a 2nd Circuit judge said two organizations that brought the lawsuit lacked standing.