A Montgomery County judge yesterday ruled that the county's creative attempt to tax cigars, smokeless tobacco, and loose-leaf tobacco does not violate state law, allowing the first such levy in Maryland to take effect at once.

Circuit Court Judge Rosalyn Bell said the unorthodox way Montgomery plans to tax all tobacco products except cigarettes does not breach state rules that prohibit counties from imposing sales taxes. The ruling is a victory for County Executive Douglas M. Duncan (D) and a County Council that passed the measure in December over opposition from the business community.

"Predictably, the tobacco lobby fought us every turn during the legislative process, and when that failed, they fought us in court," Duncan said in a statement. "Fortunately, the public interest won out over the self-interests of the tobacco industry."

The ruling allows Montgomery to begin collecting the tax from the county's roughly 800 licensed tobacco vendors in two weeks. The tax requires Montgomery retailers to pay an extra 3 or 6 cents per cigar, depending on its size, and 36 cents per 1.5 ounces of snuff, pipe tobacco or loose-leaf cigarette tobacco. Chewing tobacco will be taxed at 36 cents per 3 ounces.

In most cases, wholesale distributors pay tax based on their sales to retailers--a practice governed by state law. Montgomery got around the state regulation by assessing retailers based on what they purchase from wholesalers, regardless of whether they actually sell the product. Either approach usually raises the cost of such products, which public health officials say is a good way to discourage children from smoking.

"We did a lot of homework on this statute and we felt going in that we had threaded the needle very carefully on how to impose this tax," said Marc P. Hansen, the senior assistant county attorney who argued the case.

The county levy will expire next July when the state begins taxing the same products as a result of legislation passed by the General Assembly this year.

Until then, county officials expect the tax to raise $150,000 to $200,000 for anti-tobacco education programs, after subtracting the administrative costs of collecting the tax.

Montgomery's tax on all tobacco products except cigarettes was the first passed in the state, though Baltimore has since approved similar legislation. Bruce Bereano, the lawyer representing tobacco vendors, said he has not decided whether to appeal Bell's ruling to the Maryland Court of Special Appeals.

"I don't know if I can let Montgomery get away with this one," Bereano said.

Nine tobacco vendors filed suit last month, challenging the tax on the grounds that it was a disguised sales tax, and a judge immediately put the law on hold pending the result of yesterday's hearing.

Vendors say the tax will be cumbersome to impose and dampen sales.

Sheldon Sadugor, owner of Century Distributors in Rockville, accepted the ruling with resignation. He said he would let Bereano decide whether to appeal, which could cost as much as $20,000.

"It was disappointing, but both attorneys presented a good case," Sadugor said.

Last month, county finance officials mailed letters to all county tobacco vendors advising them to apply for tax account numbers. So far only one-fourth of them have done so.

"We think some people have been holding off hoping they don't have to pay the tax," said Timothy Firestine, the county's finance director. "There are some major businesses out there that we haven't heard from. If we don't, we'll send out the auditors."