SACRAMENTO, Calif. – A California initiative to increase the tax on tobacco to pay for cancer research has failed by less than a percentage point after remaining too close to call for more than two weeks.

With about 5 million ballots cast, opponents of Proposition 29 led by about 28,000 votes. The Associated Press analyzed areas where the roughly 105,000 uncounted votes remain and determined Friday there were not enough places where “yes” was winning to overcome the deficit.

Cyclist Lance Armstrong, a cancer survivor, headed the plan to add $1 to the cigarette tax. Tobacco companies, led by Philip Morris, meanwhile, pushed the opposition campaign, pouring millions of dollars into an advertising blitz that whittled away support. Polls showed approval peaked around two-thirds in March but fell dramatically in the weeks before the June 5 balloting.

On Friday, Prop 29 was failing 50.3 percent to 49.7 percent.

Support was strongest in the San Francisco Bay Area, while more conservative places like Southern California’s Inland Empire opposed it.

Had the measure passed, Californians would still have paid only the 16th-highest tobacco tax in the nation, at $1.87 per pack.

Proponents said they would be back. “This came so close, I think this is worth another try,” said Stan Glantz of the University of California, San Francisco’s Center for Tobacco Control Research and Education. “I think it would be horrible if Philip Morris and Reynolds get away with this.”

He suggested that supporters might turn to the Legislature, but lawmakers routinely reject attempts to raise tobacco taxes.

Opponents of the measure raised $47 million to fight it. By comparison, Jerry Brown spent about $36 million in his successful 2010 bid to become governor.