It was an emotionally frail Bettye Lynn Smith who finally, reluctantly, appeared yesterday as a witness against D.C. Mayor Marion Barry.

Under a court order and escorted by federal marshals from a hospital bed in Chattanooga, Tenn., Smith, wearing a black hat and dark sunglasses, spoke faintly and tearfully as she answered preliminary questions from U.S. District Judge Thomas Penfield Jackson. After taking the oath, it appeared she might fall as she climbed into the witness stand.

But it was a different Smith who began to answer questions from the prosecution. The tears were gone. She no longer looked feeble, but feisty. She spoke in a clear voice sometimes filled with sarcasm, condescension or impatience.

Before the eyes of the judge, jury and spectators, including Nation of Islam leader Louis Farrakhan, Smith was transformed. The only sign of nervousness was her hands fluttering around her bright red lips as she listened to questions.

In some ways, Smith was the most independent of the women called to the stand by the government. A former consultant with W.R. Lazard & Co., once the city's top financial adviser, she holds a master's degree. Yesterday, she said her relationship with Barry was "a close intimate friendship, but it was not a sexual friendship" -- unlike those described by several other women who have testified in the trial.

Smith was brought to court after a charter flight from Tennessee, where she had been hospitalized for stress. Prosecutors last week obtained a court order compelling Smith to testify, and Jackson on Monday ordered the U.S. Marshals Service to bring her to Washington.

When she finally took the stand, it was as if Smith had no intention of making it easy for the prosecution or the defense. When Assistant U.S. Attorney Judith E. Retchin asked her where Barry was in the courtroom, Smith replied, "You are blocking his view -- my view of him."

Several times when Smith's responses conflicted with her grand jury testimony, Retchin read from that testimony. Smith seemed unfazed by the contradictions. "If I said that, then that is a fact; but the answer to your question is I don't remember at this time," she said.

Smith testified that she first used cocaine with Barry in 1983. In one exchange, she spoke of bringing cocaine to Barry, who she said took it to the bathroom. "I have no idea what he did with it," Smith said.

"How long was Mr. Barry in the bathroom with the cocaine?" Retchin asked.

"Ms. Retchin . . . " said Smith, as if admonishing a child.

"Was he in there long enough to use the cocaine?" Retchin asked.

"He was in there long enough to use the cocaine, he was in there long enough to use the bathroom," Smith said impatiently.

Later, when defense attorney R. Kenneth Mundy pushed Smith to name the day of the week on which something occurred three years ago, Smith bristled.

"I had one Prozac and two Ativans and nothing else this morning and I really, really can't give you that detail," she snapped. Prozac is a drug prescribed for depression; Ativan is used to reduce anxiety. Both drugs can interfere with cognitive and motor skills.

"Let me ask you, if I could be more focused, did cocaine affect your memory or did it it have any effect upon your memory whatsoever?" Mundy asked at one point.

After a brief pause, Smith answered deadpan, "Not that I recall." Most people in the courtroom laughed heartily.