Once again, Shannon Gregor had ditched her three children and husband and emptied the bank account. She headed for her dealer's house and then to a $120-a-night Baltimore hotel, where she snorted her way through a $1,000 mound of cocaine and then called for more. This, she knew when she woke up bleary-eyed the next day, was the bottom.

Yet on Thursday, just a few weeks later, she sat in an Anne Arundel County courtroom, looked Judge James M. Dryden in the eye and smiled confidently. She had been drug-free for 59 straight days with the urine tests to prove it.

"You're coming up on two months of being clean," Dryden said, leafing through her file.

"Two months tomorrow," she said, shoulders back, beaming.

Dryden couldn't help grinning back at Gregor, the 29-year-old daughter of a police detective who spent a career locking up people just like her. In the drug court, Dryden uses jail only as a last resort. And now the program and others like it have become so popular that several other jurisdictions across the state are considering starting drug courts, which favor treatment and counseling rather than jail time.

Howard and Baltimore counties, where dockets and jails are swollen with drug offenders, hope to join Anne Arundel, Prince George's and Harford counties and the District and Baltimore city, which all have drug courts. And even though the courts don't come close to solving the country's drug problem, they have become hugely popular with jurisdictions desperate to try anything.

There are 850 such courts for juveniles and adults in jurisdictions across the country and 350 more planned, according to the National Association of Drug Court Professionals.

The movement in Maryland is gaining momentum from Gov. Robert L. Ehrlich Jr. (R), who has vowed to make fighting drug addiction a top priority and pledged in his campaign to create juvenile drug courts across the state.

"The drug epidemic makes us bleed every day," he said in his inaugural speech last week. "It must be addressed, and you are going to hear a lot about this problem from our administration."

It works like this: Nonviolent drug offenders are offered a choice of jail or the court program. If they pick the latter, they meet with case managers who assess their needs and draft a plan of treatment.

Some offenders must go to therapy or counseling every day, others once a week. Some receive counseling that helps them find a job or a home or be a better parent or student. If the defendant skips treatment or fails a drug test -- some are scheduled, some random -- the judge can send them to jail or make treatment more rigorous.

"In the past, court was like an industry: Come in, get your sentence and go to jail," said Gray Barton, executive director of the Maryland Drug Treatment Court Commission. "But now these judges have a chance to make a difference in some of these people's lives."

For those who complete the drug court program, the recidivism rate is between 4 percent and 25 percent, compared with 60 to 80 percent for the general prison population, according to Susan P. Weinstein, chief counsel of the drug court association. It is also less expensive than jail, she said.

While the evidence suggests that drug courts have been successful, their reach is severely limited. Only about 8 percent of all drug offenders enter drug court programs, Weinstein said, mainly because those who commit a violent crime are ineligible.

Anne Arundel court officials have been able to persuade only about 500 people to enter the voluntary program since its start in 1997; just 140 have graduated. Meanwhile, drug arrests in the county have jumped from 2,531 in 1996 to 2,711 in 2000, according to a University of Maryland study.

Howard County Circuit Court Judge Lenore Gelfman has been pushing for the county to open a drug court for more than a year.

"With the number of drug cases on the rise, we have to do something," she said.

Drug arrests in Howard jumped from 888 in 1996 to 1,223 by 2000, according to the University of Maryland study. About 80 percent of inmates in the Howard County Detention Center have a substance abuse problem. The number of people seeking treatment for heroin went from 210 in 1997 to 383 by 2001. And among high school students included in a survey of the county's schools, 4 percent said they had tried crack cocaine, 11 percent had tried LSD, and 53 percent had five or more servings of alcohol on the same occasion.

But Gelfman doesn't need the numbers to know there are problems: They show up in her courtroom every day.

Her caseload for Friday was no exception: 41 small bags of marijuana found in the spare-tire compartment of a speeding car; a man arrested by an undercover officer on suspicion of selling crack cocaine on Route 1 in Jessup; crack rocks a patrol officer found in a cigarette box.

"I think everyone realizes that drug and alcohol addiction is what drives the majority of crime in any community, and certainly that would apply to Howard County," said State's Attorney Timothy J. McCrone.

For years, Dryden sentenced drug users to jail, only to see them complete their time and return on another drug charge. Participants in the drug court also relapse, but now, Dryden said he can do something about that besides locking them up in a crowded prison.

On Thursday, Dryden was confronted with a trying case.

"It looks like we had a little bad patch in the road," Dryden said.

"Yes, we did," said the defendant, a young man with bleached blond hair, sideburns and a craving for heroin and cocaine he couldn't seem to give up.

"You know what this means," Dryden said.

The young man did: more intensive treatment -- as much as three hours a day, three days a week -- or a weekend in jail. He preferred jail. Without a car, getting to treatment meant he would have to miss work, potentially costing him his job.

But Dryden wasn't convinced that jail was the best option. "Maybe you'd rather just do the quick and easy thing instead of showing up every day and having to prove something to someone," he said.

"I'm not crazy about going to jail at all," the young man said. "I've never been before in my life." He continued his lament about transportation and vowed: "I'm not going to touch the stuff again. It was very poor judgment. I'm done with it."

"Well, you admitted the cocaine use before the urinalysis came back positive," Dryden said. "That's a good sign."

So a weekend in jail it was.

Just a few months before, he imposed the same sentence on Gregor.

Her tests had been coming up drug-free -- in part because she would sneak in a water bottle full of urine that she knew was drug-free. But finally she was caught.

The first time, Dryden ordered more frequent therapy sessions. The second time, he put her under house arrest and ordered drug tests every other day. The third time, jail.

Still, she kept using.

Her parents took her children away and threatened to get a court order for custody if she protested. She didn't.

Her husband would deposit his paycheck, "and the next day, I'd take out the whole thing," she said. She would stay out sometimes for three days at a time, sleepless, feeding an addiction that was carving canyons in her memory.

Then last November, she blew through an ounce of cocaine in the Baltimore hotel, snorting lines as thick as her finger for 12 straight hours.

The next day, lost in deep depression, she decided to check herself into a clinic. She hasn't touched cocaine since.

"You seem happy today, and you look good," Dryden told her as she sat before him Thursday. "It's really nice to see you doing this well."

She felt good, she said, confident that she had licked her addiction. Dryden said he was, too. Still, she wasn't there yet. She would have to continue counseling, work on staying clean and then report back to court in three weeks.

He had seen too many fail surprise drug tests at the end to let her off just yet.

Instead of going to jail, Shannon Gregor has attended a treatment center in Glen Burnie to help overcome her addiction to cocaine.