PHOENIX - Arizona is on the verge of finally getting a law that will allow patients to obtain marijuana legally.

Although Maricopa County still has about 10,000 ballots to count, the latest vote totals released Friday show the proposition with an all-but-insurmountable 4,421 vote lead, out of more than 1.6 million cast.

Maricopa County Recorder Helen Purcell said the remaining ballots include about 2,000 provisional ballots, which were mostly cast at the polls on Election Day by people who had previously requested and been mailed an early ballot. Purcell said her office needs to make sure they had not voted twice.

She noted the trend in the provisional ballots has been running close to 2-1 in favor of the measure.

That leaves just 8,000 early ballots from voters who over-inked their marks, resulting in a bleed-through to the other side of the paper.

Among early Maricopa voters, the measure is losing by a 48-52 percent vote. And County Elections Director Karen Osborne said the early ballots being counted now are running at virtually the same margin as those already tallied.

Even if those votes continue to trend against the initiative, it would take a big shift in the margin to overcome the 4,421 advantage.

Proposition 203 actually won only in Pima, Coconino and Santa Cruz counties. But the big margin of victory in Pima - more than 43,000 votes out of nearly 306,000 cast - was enough to cancel out opposition elsewhere, especially with the measure losing overall in Maricopa County by fewer than 4,000 votes.

Carolyn Short, who chairs Keep AZ Drug Free, said it could have been worse.

"We were predicted to lose by a landslide," she said. She also said foes could have killed the measure if they had had more time and more money.

Assuming the final vote tally holds, nothing will change immediately. The measure gives state health officials 120 days after the effective date of the law - when the results are certified - to set up the procedures. That puts the likely start of the system in late February.

This is actually the third time Arizona voters have approved a law allowing doctors to give them the legal go-ahead to obtain marijuana.

An initiative approved in 1996 and re-ratified two years later allowing doctors to prescribe otherwise illegal drugs to patients never took effect because the U.S. Drug Enforcement Agency threatened to revoke the prescription-writing privileges of any physician who wrote such an order.

This year's version got around that problem by saying a patient needs only a written "recommendation" by a doctor, a model copied from successful medical-marijuana measures from other states. And the Obama administration has said it does not intend to bring federal drug charges against patients in states with medical-marijuana laws.

The vote is a defeat for county prosecutors and sheriffs who lined up against the measure, as did Gov. Jan Brewer. State Health Director Will Humble said he fears the measure will lead to abuse, as it has in other states.

But Andrew Myers, the campaign director for Proposition 203, said this initiative is different.

"We've been talking throughout this entire campaign about what this industry needs to look like and how we want to be a model for the rest of the country," he said. Myers said it was crafted "so it doesn't create the kind of problems we've experienced in places like California and Colorado."

California in particular has been a poster child for those arguing against the measure. There, minimal restrictions spawned a cottage industry of walk-in doctors and dispensaries.

The Arizona law has a specific list of conditions that would let a doctor write a recommendation. And the number of dispensaries is limited to one for every 10 pharmacies around the state, a figure that currently computes to about 125.

Short, however, contended that people were willing to vote for the measure because they "didn't know about it" and were "not fully informed."

Matthew Benson, press aide to Secretary of State Ken Bennett, said only Maricopa County has outstanding provisional and early ballots.

The only thing left after that, he said, are some ballots with write-in candidates. But Benson said that won't affect the initiative because there is no write-in option on the yes-no question.