A mother and boyfriend charged in the death of a 2-year-old girl whose body washed up on a Boston Harbor beach can have their own autopsy conducted on her remains, a judge ruled Tuesday.

Rachelle Bond and Michael McCarthy were charged last month. Bond's daughter, Bella, was known as "Baby Doe" for nearly three months as authorities launched a massive investigation and social media campaign to find out who she was and how she died.

The girl's body was found in a trash bag on Deer Island in June. State police put a composite image of the brown-eyed, chubby-cheeked girl on Facebook and on billboards, generating hundreds of leads but not the identity of the girl.

Finally, on Sept. 16, police received a tip after Bond told a man who lived with the couple earlier this year that McCarthy killed Bella by punching her repeatedly in the abdomen one night when she would not go to sleep.

McCarthy's lawyer has said he denies killing the child and claims Bond told him her daughter had been taken away by the state's child protection agency.

McCarthy, 35, is charged with murder, while Bond, 40, is charged with being an accessory after the fact. Both have pleaded not guilty.

A judge approved the request for a separate autopsy during a brief hearing Tuesday in Dorchester District Court. McCarthy and Bond will each have an independent pathologist for the second autopsy, said Bond's attorney, Janice Bassil.

"Although my client was reluctant to do this, I felt that it was important in corroborating her statement as to the manner in which Michael McCarthy killed her child," Bassil said after the hearing.

McCarthy's lawyer, Jonathan Shapiro, said he wanted the second autopsy because the murder charge against McCarthy is based on Bond's statements to police. He said Bond is "completely not credible."

McCarthy and Bond are due back in court on Nov. 19 for a probable cause hearing.