PHOENIX - Gov. Jan Brewer has signed a waiver to allow Attorney General Tom Horne to try to close down the marijuana dispensaries that her state health department is in the process of licensing.

The move comes in the wake of Horne's legal opinion that the state cannot legally permit anyone to sell marijuana, even to those who have a doctor's recommendation to use the drug. Horne said as long as the drug remains illegal under federal law, the state is powerless to authorize anything to the contrary.

But the governor said Thursday that she does not intend to block Health Director Will Humble from continuing the process of issuing state permits. And Humble, who conducted a lottery Tuesday to see who gets to serve each of the 126 health districts in the state, said the first of those shops could be open by the end of the month.

The need for the waiver stems from the Attorney General's Office's representation of all state agencies, meaning Horne's lawyers would have to defend the Department of Health Services in any legal proceeding.

"I gave him a waiver and put kind of a wall between Mr. Horne and myself so that he could represent this position and he could still represent me with other attorneys on the other side," Brewer said.

Horne said this arrangement will allow one of his deputies to continue to provide legal advice to Humble, even as the Attorney General's Office pursues a court order declaring the dispensaries pre-empted by federal law.

But he insisted this won't create a situation where he will be facing off in court against one of his deputies.

Horne said he intends to intervene in a legal fight between Maricopa County and the owner of a clinic that wants to open a marijuana dispensary in Sun City over the county's refusal to provide the necessary zoning certification.

Horne figures that could become a test case for the larger issue of whether government agencies can process requests to do something that remains a crime under federal law. By extension, it would require a judge to decide if federal law trumps the provisions of the 2010 voter-approved Arizona Medical Marijuana Act, which authorizes people with certain ailments to possess the drug and those licensed by the state to sell it to them.

"The health department isn't taking a position," Horne said, meaning his office won't have someone representing the agency at the hearing to defend the legality of the dispensaries, even as he works to shut them down.

He said the fact that the health department is going ahead with the licensing of dispensaries does not mean it believes operation of the outlets is legal. "They're proceeding right now because that's their duty," Horne said.

Brewer pointed out that she had concerns about the legality of the dispensaries and whether state health workers who process the licenses could be charged with violating the federal Controlled Substances Act, and even previously ordered Humble not to process the applications.

However, a judge subsequently ruled she had to carry out the voter-approved law.

But Brewer said Horne and Maricopa County Attorney Bill Montgomery remain free to try to shut down the dispensaries anyway.