Two small Maine marijuana businesses filed a federal lawsuit against the state agency overseeing marijuana policy and seven recreational cannabis operations on Monday, alleging their licenses were granted illegally because they have out-of-state owners.

It’s a David vs. Goliath issue with millions at stake for businesses and the state’s tax coffers. While Maine’s marijuana law specifies that business applicants granted active licenses must have filed state income taxes for four years and live in Maine, the state said in May it would not enforce the requirement because it was unlikely to withstand a legal challenge.

The lawsuit in U.S. District Court says out-of-state companies take away a competitive advantage for Mainers. For the three-day holiday weekend when recreational sales started on Oct. 9, six of nine active licensed retail stores were open and sold more than $258,400 in products with total sales taxes collected of $25,841, according to the Maine Office of Marijuana Policy.

That office nixed the residency requirement upon advice from Attorney General Aaron Frey after a March lawsuit from Wellness Connection, the largest medical marijuana dispensary chain in the state that is 49 percent owned by a Delaware investor. It alleged the residency requirement restricted it from raising money to enter the recreational market.

Though the marijuana policy office said it would introduce legislation to change the law, it still remains unchanged. The new lawsuit alleges the state knowingly and illegally granted active licenses to entities with some portion of out-of-state ownership, asking the court to vacate the seven licenses it claims were illegally granted and prohibit the state from issuing more.

James Monteleone, a Portland-based attorney with Bernstein Shur representing the plaintiffs, said the state “decided not to enforce the law” and “that’s not an option.”

“We’re just looking for a fair shake,” he said. “The Legislature adopted a law that says Maine companies are going to be the ones that are eligible for licenses.”

Among the two plaintiffs is Dawson Julia of Unity, a medical marijuana caregiver and a well-known activist for small marijuana businesses in Maine. Fellow caregiver Christian Roney has applied for an adult-use license from the state. Julia and several other caregivers demonstrated outside the Theory Wellness retail store when it opened in South Portland on Oct. 9.

The two are suing the Maine Department of Administrative and Financial Affairs, which oversees the Office of Marijuana Policy, and Commissioner Kirsten Figueroa of the department.

They also are suing seven entities with out-of-state ownership listed in state filing. Those include three businesses of Theory Wellness, which is partially owned by a Massachusetts company that has also won cultivation and manufacturing licenses in Maine’s adult-use program. The others, Cannabis Cured Cultivation, Mainely Baked and Spectrum Solutions all have a common owner from New Hampshire, and Northland Botanicals also has an owner from New Hampshire.

Attorney Hannah King of Drummond Woodsum in Portland, who represents Cannabis Cured Cultivation, Full Spectrum Solutions and Mainely Baked, said the allegation that the companies do not comply with the residency requirements in the adult-use marijuana law is “patently false” since they are majority-owned by Mark Crockett, a Maine resident and longtime caregiver.

“Their inclusion in this lawsuit is a misguided and baseless attack on a fellow Maine resident and caregiver simply because the plaintiffs perceive them as competition,” King said.

Frey spokesperson Marc Malon said the state had no comment on the pending litigation. Thomas Winstanley, director of marketing for Theory Wellness, also declined comment on the lawsuit.