But Michigan's highest court differed from a state Appeals Court ruling in the same case, from Isabella County, in deciding that cash sales of marijuana are allowed under the state's medical marijuana act - despite an impassioned argument from Michigan Attorney General Bill Schuette against any sales of the drug.

"Today, Michigan's highest Court clarified that this law is narrowly focused to help the seriously ill, not an open door to unrestricted retail marijuana sales," Schuette said in a statement.

"Dispensaries will have to close their doors," he said.

Eighteen states and the District of Columbia have medical marijuana laws, according to the National Conference of State Legislatures. Eleven of those states and the district allow dispensaries.

The act that Michigan voters passed in 2008 to allow medical marijuana use did not include the words "sale" or "dispensary." But hundreds of retail outlets in various forms sprang up, some calling themselves clubs.

In 2010, many began folding when the state Appeals Court ruled against allowing dispensaries in the same Isabella County case.

"I did read the opinion and it's not pretty, but I was sort of expecting this," said Tim Beck of Detroit, a retired health insurance executive who helped write the ballot proposal that voters approved.

"What we said originally in the plain language of the act was that the only way a person could get medical marijuana was by either growing their own or getting it from a caregiver" - an approved provider tied to just five patients on the state registry, Beck said.

"We thought the word dispensary was just too dangerous and would cause us to lose at the polls," he said.

Today's ruling involved what judges called a "membership organization" named Compassionate Apothecary, which only state-registered caregivers and patients could join.

Members rented lockers from the defendants when they had grown more marijuana than they needed. The two defendants provided a display room, would weigh and package the drug, then take a service fee for each transaction, said the ruling in State of Michigan v. McQueen.

In a 4-1 decision, the justices ruled the state law implied that sales of the drug were allowed but said they could not take place "in a business that facilitates patient-to-patient sales of marijuana."

"A lot of cases have been stayed in circuit courts around the state, waiting for this decision," said defense lawyer Paul Tylenda of Grosse Pointe Park, Mich.

"Now, honestly, this isn't the help that these clients were looking for," Tylenda said. He represents four clients charged with operating dispensaries.

But some dispensary owners voiced cautious hope that they could stay in business.

"We're still trying to figure out what this means," said Jamie Lowell, co-owner of Third Coast Compassion Club in Ypsilanti, Mich.

"Ultimately, we're a private club," Lowell said.

He and his business partners, along with numerous other dispensary owners, helped to pay legal costs in the early stages of the McQueen case, he said.

"We took an empty building, fixed it up, and hired four employees to work here, all to help people with their health care choices," Lowell said.

A bill pending in the state Legislature would allow dispensaries, "and now it's really time for all of us to get behind that," he said.