Josh Duggar will be allowed to see his six children as he awaits his July trial for allegedly possessing and receiving child pornography.
During a virtual detention hearing on Wednesday at the U.S. District Court for the Western District of Arkansas, Judge Christy Comstock ruled that the former 19 Kids and Counting star can be released from jail to his designated third party custodians, family friends Lacount and Maria Reber.
Though the judge noted that she "cannot in good conscience" release Duggar to his pregnant wife Anna and their children, she granted him "unlimited contact" with the kids, so long as Anna is present.
Aside from his own children, however, Duggar, 33, is not permitted to have contact with any other minors, including his many nieces and nephews.
Kris Connor/Getty Images Josh Duggar
"I recommend that you govern your actions by thinking about where you might go and who you might encounter," the judge advised Duggar during the hearing. "You might not ought to go to birthday parties, family dinners, church activities. These things that might risk violating this condition, do you understand?"
"Yes, Your Honor," he replied.
Instagram; Inset: Courtesy Washington county arkansas
Want to keep up with the latest crime coverage? Sign up for PEOPLE's free True Crime newsletter for breaking crime news, ongoing trial coverage and details of intriguing unsolved cases.
At his detention hearing, Homeland Security Investigations Special Agent Gerald Faulkner detailed the disturbing allegations in the federal investigation into Duggar, alleging that he had over 200 images that were flagged as child sexual abuse on his computer.
RELATED VIDEO: Josh Duggar Charged with Receiving and Possessing Child Pornography, Pleads Not Guilty
One file, according to Faulkner, depicted child sex abuse involving children ranging from 18 months to 12 years of age. Faulkner described the images as "in the top five of the worst of the worst that I've ever had to examine."
In May 2015, he apologized for his "wrongdoing" following the release of a 2006 police report that revealed he had been investigated as a teen for inappropriately touching five underage girls. His sisters Jill, 29, and Jessa, 28, subsequently stepped forward as two of the victims.
If convicted of the current charges against him, Duggar could face up to 40 years in prison. His pretrial hearing is set for July 1, while the trial is scheduled to begin on July 6.
If you or someone you know has been a victim of sexual abuse, text "STRENGTH" to the Crisis Text Line at 741-741 to be connected to a certified crisis counselor.
If you or someone you know has been sexually assaulted, please contact the National Sexual Assault Hotline at 1-800-656-HOPE (4673) or go to rainn.org.