A 5-year-old girl, the youngest child ever to take the witness stand in Montgomery County Circuit Court, used anatomically correct dolls to testify yesterday that her father sexually abused her and her 8-year-old sister, who is mentally retarded and speech impaired.

Turning often to wave and smile at her father, the little girl, clad in a baby pink smock dress and stockings, told the jury, "He hurted me."

The child, who is epileptic and learning disabled, placed a male doll she called "Daddy" on top of a female doll named for her to show the jury of five men and seven women what she alleges her father did to her and her sister between January and June of 1984.

Throughout her testimony, the father, a 35-year-old laborer, stared at his daughter, occasionally smiling at her.

After she testified, the girl skipped out of the courtroom, pausing to shout "Bye, Daddy." The family's name is not being used in this story to protect the identities of the two girls.

Judge DeLawrence Beard ruled yesterday morning that the child was not competent to testify against her father, who faces up to 30 years in prison if convicted of molesting both daughters.

But after studying case law during the lunch recess, Beard reversed his decision and ruled that the girl could testify for the prosecution. He cautioned the jury, however, that it must decide what weight, if any, to give the child's testimony.

The man, who is serving a six-month sentence at the Montgomery County Detention Center for sexually assaulting the girls' mother, has three prior convictions for indecent exposure involving children.

The couple, who have been married 11 years, have been separated since last June when the mother sought a protective court order against the father.

Dr. Anne Frankel, a physician with the county Department of Health who specializes in child abuse cases, testified that her physical examination of both children revealed injuries commonly associated with sexual abuse. Frankel also said that the girls and their 32-year-old mother had venereal infections.

Weeping, the mother testified that she found her husband in bed with her older daughter.

She testified that last spring her husband began an escalating pattern of unnatural sexual behavior at home that included undressing around the girls. But she said that she did not think that her husband was molesting her daughters until their grandmother noticed that the girls had unusual discharges.

With the mother's testimony, Assistant State's Attorney John J. McCarthy rested his case. Beard asked the jury to leave the courtroom and defense attorney Cleopatra Campbell moved for aquittal.

"We have here suspicions but we don't have evidence," Campbell told the judge.

She said the man should be aquitted because the state had not produced sufficient evidence for a "reasonable" jury to convict him.

McCarthy countered that Frankel's medical testimony amounted to physical evidence of abuse and that the testimony of the mother and daughters showed a pattern of exploiting the children. Under Maryland child abuse laws, prosecutors must prove that molestation or exploitation occurred.

Beard said he would consider Campbell's motion for aquittal and decide today whether the case should be dismissed or go to the jury.