SANTA ANA, Calif. (AP) _ The case of the confiscated cookies has ended with their maker giving up a little dough and county offices no longer smelling like a cookie jar.

The evidence became garbage Wednesday when 979 tubs of chocolate chip cookies, weighing 2,448 pounds, were deposited at the Brea dump.

The cookies, made by Hobbitt Cookies of Santa Ana, were confiscated from two stores in November as alleged evidence that the bakery was operating without a health permit.

For eight months, the cookies were stacked 10 feet high in a meeting room at the Orange County environmental health office, covering two walls.

No one was happier to get rid of the cookies than Bob Merryman, the county's environmental health director. ''The room really is kind of sickening. One smell of cookies is OK, but you get this big whiff when you open the door,'' he said. ''I had to leave meetings after half an hour.''

''This was not your normal run-of-the-mill criminal case,'' said Randall Hite, the attorney for Hobbitt. ''When people around the courthouse realized what it was about, it became known as the cookie caper.''

The caper concluded after Hobbitt, charged with nine counts of violating the California Uniform Retail Food Facilities Law, agreed to a settlement last month under which all charges were dropped.

The settlement called for Hobbitt to pay $750, drop a claim it had filed against the city and relinquish ownership of the confiscated cookies.

''This is the most unusual condemnation I'm aware of in 17 years here,'' said Jim Huston, assistant director of county environmental health.

A county health inspector discovered alleged violations at Hobbitt's Santa Ana plant a year ago and the company was ordered to shut down. But in October, inspectors found evidence of clandestine cookie baking, including raw ingredients and utensils, Huston said.

The cookies were seized as evidence.

Hobbitt filed a claim against the city, contending the confiscated cookies were baked legally at a licensed plant in adjoining Los Angeles County.

The Santa Ana plant ''was used only for testing recipes and as a training area for people learning to make the cookies by hand,'' Hite said.

''There were never any allegations that the cookies were in any way contaminated or unsafe. It was all building code and permitting violations,'' Hite said.

''The cookies are probably the finest ones made anywhere. Take my word for it, I've sat in front of my television set and eaten half a tubful,'' he added.