YORK, Maine — Eight medical marijuana caregivers who lease space at a White Birch Lane growing facility are filing a lawsuit against the town of York, charging that a town ordinance passed last fall violates their rights under the state’s medical marijuana law.

It is the first suit of its kind in the state of Maine, said the plaintiff’s attorney Lynne Williams of Bar Harbor, Maine, who has represented Maine caregivers in other legal matters since the state law was passed in 1999.

“I do know that other towns are following this case in York carefully,” said Williams, who said she mailed the lawsuit to both York County Superior Court and to the town of York on Thursday.

The caregivers are referred to only as John Doe 1-8, because according to the suit, they have been granted anonymity under the state law. A separate document filed in York County Superior Court seeks a judicial order that would continue to prevent their names from being made public throughout the court proceedings.

The suit alleges that a town ordinance passed by voters last November violates state law specifically because its effect would be to make the caregivers’ names public. Further, the suit alleges, the town wants to inspect the premises, which it is prohibited from doing under state law.

The town ordinance was put before voters after months of procedural and legal wrangling with Robert Grant, the owner of the growing facility at 17 White Birch Lane. The plaintiffs all lease space at the facility to grow marijuana plants for their patients, who in turn pay the caregiver.

Last summer, the town Appeals Board determined Grant’s facility to be a manufacturing operation and therefore allowed under zoning ordinances; but Town Manager Steve Burns quickly moved to put a measure on the ballot to regulate growing operations.

Under the ordinance, all caregivers are required to obtain a business license from the town of York, just like any other businessperson must. As part of that process, the caregiver would be required to fill out a form and the Board of Selectmen would grant the license, which would become public record and procedure. Before that, according to the ordinance, the Police Department must inspect the premises.

Maine’s medical marijuana law does not allow either process to take place, the suit alleges.

“What the town is trying to do is make the caregivers violate state law,” Williams said

In a separate request for preliminary injunction, the suit states that the town has notified the caregivers that they must obtain a business license by May 5. The injunction seeks to prevent the town from proceeding.

If they don’t get a license, “the possibility of eviction is very real, given the months of harassment towards their landlord, who town leadership and police have pressured to force the plaintiffs to comply with the amended ordinance,” the suit states.

The consequences could result in “at a minimum, interruption of plaintiffs’ business operations and financial loss and, at worst, destruction of plaintiffs’ business,” according to the suit.

On April 15, a notice was placed on the door of the facility which required the caregivers to schedule a police inspection of their operation. The suit alleges that under the medical marijuana law, such facilities must be under lock and key and can only be accessed by the owner or caregivers. The law does not allow caregivers to admit police, the suit alleges.

Town Manager Steve Burns said Thursday he could not comment, as it is a pending legal matter.