Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Michigan judge has ordered the release of three children from a juvenile detention facility where they were placed after the kids refused the judge’s order to meet with their dad.

Oakland County Judge Lisa Gorcyca sent the children — ages 9, 10 and 15 — to a juvenile detention center on June 24 for failing to maintain a "healthy relationship" with their father.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

On Friday the judge ordered that the children be sent to a summer camp instead, NBC station WDIV reported. Visits with their parents will be permitted at the camp, the station reported.

Gorcyca held the kids in contempt of court after they refused to have lunch with or talk to their dad in the Oakland County Family Court cafeteria. They were kept away from juveniles who committed crimes while at the detention center, The Associated Press reported.

RELATED: Judge Orders Kids to Juvenile Detention Center For Refusing to Meet With Dad

According to court records, the children's parents have been involved in a lengthy custody dispute since December 2009.

The siblings were removed from their mother's custody after the June 24 court hearing. According to a court transcript of the hearing obtained by NBC News, Judge Gorcyca told the siblings they should have lunch with their father, but the kids refused.

Gorcyca told the kids at the June hearing, "Your dad is a good man who loves you," according to the transcript. One of the siblings told the judge earlier in the conversation that he did not want to apologize to his father because he allegedly had been violent with his mother in the past.