The pharmaceutical industry is challenging an Alameda County ordinance, the first of its kind in the nation, that requires drug companies to collect and discard the unused pills in people's medicine cabinets.

Three trade groups filed suit in federal court to overturn the Safe Drug Disposal Ordinance, which the county's Board of Supervisors unanimously approved in July.

When the ordinance is fully in effect it will require makers of drugs sold or distributed in the county to pay for a program to safely collect and destroy unused medications, or face $1,000 a day in fines. By July, companies must submit plans outlining how the program will operate.

The legislation's proponents have said drug companies, not taxpayers, ought to shoulder the cost of discarding their products for the health of the environment and their customers. Currently, people can throw away pills at about 30 drop-off locations, a program that costs Alameda County an estimated $330,000 annually.

In the lawsuit, drugmakers are complaining that bearing the sole responsibility for disposal would be unfair and unprecedented, and would be more effectively run by local and municipal governments.

But Nate Miley, the ordinance's sponsor and the Board of Supervisors president, noted that a similar drug-disposal program is operating in British Columbia, and that industry-backed disposal programs for paint, batteries and other substances are in place throughout the United States.

"I still think legally we're on solid ground," he said, "and I think in the court of public opinion, we're still on solid ground."

Environmentalists say the county's drug ordinance will benefit residents inside and outside Alameda County, since drugs can pollute the bay when they are flushed down toilets and into waterways. In addition, toddlers, teenagers and senior citizens can inadvertently overdose on old or unused pills, public health advocates say.

Other communities are watching to see what happens next, said Jonathan Scott, a spokesman for Clean Water Action, an environmental group whose local chapter supported the ordinance.

"It's not surprising that they're taking this action," he said of the lawsuit, "because it's been a pretty consistent industry tactic when local or state action is happening that provides the equivalent of the writing on the wall."