PHOENIX — Two Arizona men are arguing that a 2010 voter-approved measure designed to attack the federal Affordable Care Act gives them a constitutional right to grow their own medical marijuana.

Keith Floyd and Daniel Cassidy contend in a lawsuit filed in Maricopa County Superior Court that the state cannot require medical-marijuana recipients to obtain their drug only from a dispensary if they live within 25 miles of any of the state’s licensed facilities.

Their attorney, Michael Walz, argues that the requirement violates language now in the Arizona Constitution prohibiting any law that requires anyone to “participate in any health-care system.’’

Walz said it’s a matter of free choice.

A ruling in his favor could have broad effects.

Most immediately, it would mean that the approximately 95 percent of 40,000 medical-marijuana cardholders who now live near a dispensary would not need to pay the $250 an ounce or more now being charged by dispensaries. Instead, they could grow up to 12 plants for their own use at home.

It also could undermine the financial plans of those who have invested thousands of dollars to get one of the limited number of dispensary licenses the state is granting.

Walz said patients’ right to grow their own is constitutionally guaranteed.

The Arizona Medical Marijuana Act, also approved by voters in 2010, allows those with a doctor’s recommendation to obtain up to 2½ ounces of marijuana every two weeks. The idea was to have that sold through state-regulated dispensaries.

But the law also provided an exception for anyone living at least 25 miles away from such an outlet, with cardholders allowed to grow up to 12 plants at any one time.

With no dispensaries until this year, both men initially had been granted the right to grow. But that was rescinded by the state Department of Health Services when they renewed their medical-marijuana-user cards.

Walz contends that move is illegal in light of the constitutional amendment.

“The state does have a reasonable right to regulate medicine,’’ he said. “It’s just that they can’t compel citizens to go to one particular system or one particular outlet for the medications that they’re legally entitled to.’’

State Health Director Will Humble said he is simply enforcing the law as approved by voters. But Humble said he doubts the constitutional provision can be interpreted to let people make their own regulated medications.

“Are people allowed to grow their own amoxicillin?’’ he asked, referring to the antibiotic that now is available only by prescription and only through a state-regulated pharmacy. “I mean, this is medication.’’

“You’re dealing with a plant,’’ Walz counters. “Should those be regulated as much as pharmaceutical drugs? I would say probably not.’’

He said it would be no different if the state were to ban people from growing their own aloe plants used by some to treat burns, and instead require Arizonans to buy aloe lotion from a local pharmacy.

Several dispensaries have been licensed for the state’s largest urban areas.

But residents of some communities will not have the luxury of shopping around for the best deal. For example, the state has allocated only one dispensary for Lake Havasu City, though there always is the option to drive to Kingman, Bullhead City — or even Flagstaff or Phoenix.

Humble said, though, it makes sense to have most medical-marijuana users obtaining their drugs through a state-regulated system of growers and dispensaries rather than an unregulated system of individuals growing their own.

That system requires those with licenses to account for what they have grown or sold. Humble said there is no way to determine whether home-grown marijuana is being diverted to some use beyond that of the cardholder.

Ryan Hurley, an attorney who represents dispensary owners, said he does not believe the lawsuit has any merit.

Even if the lawsuit succeeds, he said, he doubts his clients will lose much business because most cardholders will find it more convenient to buy the ready-to-use weed from a dispensary than go through the hassle of nurturing a mature plant from seeds.