A Montgomery judge declared a mistrial early yesterday in the murder case of Charles D. Terry, 18, charged in the beating death last winter of a Silver Spring woman, after a jury deliberated nearly 24 hours without reaching a verdict.

Judge John J. Mitchell granted the defense motion for a mistrial at about 12:30 a.m. when the foreman told him the jury had not reached a verdict after a 15-hour second day of deliberations. The foreman said that the jury, which took the case Friday morning after a nine-day trial, was not deadlocked but was not close to a decision, court officials said.

Terry, who lived in Laurel and occasionally worked with his mother at the Irish Inn restaurant in Silver Spring, was charged with killing his mother's close friend Louise Pickering, 56, a part-owner of the Irish Inn, at Pickering's Silver Spring apartment last Jan. 23.

Pickering, clad only in a green bathrobe, was struck over the head that evening with a squat glass bottle of Grand Marnier -- an after-dinner liqueur -- until the bottle broke, then stabbed in the neck and chest with the broken-off stem, according to court testimony.

The following morning, Betty Hargus sent her son, Terry, to Pickering's apartment after she failed to show up for her 10 a.m. shift at the Irish Inn. When her son returned 30 minutes later with the news, Hargus raced to the nearby apartment, screaming hysterically, to find her friend lying face down on the living room floor.

Four days later, Terry was arrested after investigators received tips from friends of Hargus. Pickering, the defense later argued, had been "a second mother" to Terry, spoiling him with gifts and money.

The long trial, said Terry's lawyer, John J. Gill, "could be a novel. It is a classic whodunit." Prosecutor Robert Dean based his case on bloodstains found on Terry's clothes that matched Pickering's type, a strand of hair on his undershirt that he said came from the woman's head, and a tiny piece of glass found in his car that experts said had come from the liqueur bottle.

Terry testified that he had been in Annapolis on the night of the slaying and that the blood on his shirt was his own, the result of a fight he had with another man.

Dean never advanced a motive for the killing, but reminded the jury of $500 that Pickering had slipped into an album on her coffee table, in view of Terry. The money was not in the album after the murder, and neither side could prove what had happened to it.

Gill argued to the jury that there could be no reason for Terry to kill Pickering, and said Terry was so upset by her death that he vomited when he returned with his mother to the murder scene.

There was also, Gill said, circumstantial evidence that other persons might have had a motive for the killing. On the day of her death, Gill told the jury, Pickering had been making plans to foreclose on the Irish Inn, which she had loaned more than $20,000.

In declaring the mistrial, Judge Mitchell automatically ordered a date for a new trial. Montgomery state's attorney's office representative Michelle Kingsley said yesterday that a decision on whether to prosecute Terry again would be made "in the next couple of weeks."