JOHANNESBURG—A judge in South Africa found a woman guilty Thursday of kidnapping a newborn nearly two decades ago from a hospital and raising the girl as her own, a spokesman for the prosecution said.

Judge John Hlophe in Cape Town convicted the woman of kidnapping, fraud and contravening child protection laws, said Eric Ntabazalila, spokesman for the National Prosecuting Authority. The judge revoked bail and the woman will be detained until her May 30 sentencing, he said.

Hlophe mentioned in court that she could be looking at a 10-year prison sentence, said Ntabazalila.

State prosecutors said the woman snatched a three-day-old baby from her sleeping mother’s hospital bedside in Cape Town in April 1997. The prosecution also said the woman defrauded authorities when she registered the child as her own daughter in 2003, also changing her birthdate.

The defendant, now 51, pleaded not guilty to all three charges. During the trial she testified that she adopted the child.

“I didn’t know the baby was stolen,” the woman testified, according to the African News Agency.

The girl was reunited with her biological parents, Morne and Celeste Nurse, last year after their second daughter befriended a girl at school who looked remarkably like her. After a police investigation and DNA tests, that new friend turned out to be the Nurse’s missing child.

The biological parents sobbed as the judge read the verdict, ANA reported.

The girl, now 18, was not in court and is taking high school final exams. The judge ordered that neither the defendant nor the girl may be identified.