After nine years of cooperating with prosecutors, the former legal guardian of missing Miami foster child Rilya Wilson appeared Monday in court, where her probation was terminated.

Pamela Graham, who pleaded guilty to two counts of child neglect in 2004, will not serve any jail time.

In December, Pamela Graham testified against her former live-in lover, Geralyn Graham, who was charged with murdering, kidnapping and abusing the child in 2000. The two women are not related.

Geralyn Graham is serving 55 years in prison for kidnapping and torturing Rilya, whose body was never found. A jury in December convicted her of abusing and kidnapping Rilya, but deadlocked on a first-degree murder charge. The Miami-Dade State Attorney’s Office says it will retry her for murder.

In 2004, Pamela Graham pleaded guilty and agreed to cooperate against her former companion. Her original plea deal called for 364 days in jail plus five years of probation, to be meted out after her testimony.

Over the years, she checked in with authorities every week, exactly 416 times in all, prosecutor Sally Weintraub told Miami-Dade Circuit Judge Miguel De La O on Monday. Before Monday, Graham still believed she was going to spend the time in jail.

Pamela, a meek woman who testified tearfully at trial, said Geralyn would bind the child’s hands to the bed railing with plastic “flex cuffs” and confine Rilya for hours in a laundry room. Pamela also testified that Geralyn obtained a dog cage in which she confined Rilya to keep her from climbing on furniture.

At trial, Pamela also told jurors that Geralyn pressured her to lie about Rilya’s disappearance — but never revealed what happened to the child.

“I was scared,” Pamela Graham told jurors. “I knew that I was the one who had legal custody of her, and I was afraid that whatever happened to her, I would be blamed for it.”

The disappearance of the chubby-cheeked 4-year-old roiled Florida’s Department of Children & Families, which had awarded Pamela custody of Rilya, who was born to a drug addict.

For more than a year, the agency failed to note that Rilya was missing. When workers discovered that the girl was gone, Geralyn Graham claimed a mystery DCF worker had whisked her away for mental-health treatment.

Prosecutors in 2005 indicted Geralyn Graham on a murder charge after she allegedly confessed to a jail cellmate that she had smothered the child with a pillow and disposed of her corpse in a body of water in Southwest Miami-Dade.