The company argued that the ordinance, which took effect Oct. 1, violates freedom of speech by interfering with its communications with its customers. Company lawyers contended the ban effectively forces Philip Morris to pull its advertising from drugstores and was motivated by the city's hostility to the ads' message that smoking is acceptable.

The city countered that the ordinance doesn't limit advertising and applies only to tobacco sales, which aren't protected by the right of free speech.

U.S. District Judge Claudia Wilken of Oakland, after a brief hearing Thursday, denied a preliminary injunction that would have put the ordinance on hold until the company's case went to trial. Wilken previously rejected Philip Morris' request for a restraining order that would have blocked the measure.

The ordinance prohibits sales of cigarettes and other tobacco products at the city's nearly 60 drugstores but exempts supermarkets and big-box retail stores that also have pharmacies.

Walgreens, citing that exemption, filed a separate suit in San Francisco Superior Court, arguing that the ban amounts to unconstitutional discrimination against drugstores. But a judge denied an injunction Sept. 30, accepting the city's argument that it is entitled to single out businesses, like drugstores, where customers go to improve their health. The company has appealed.

Deputy City Attorney Vince Chhabria, who is defending the ordinance in both cases, said he hopes Philip Morris will drop its case "so that the city can stop wasting tax dollars defending this frivolous lawsuit."