This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

FAYETTEVILLE, Ark. (WJW/AP) — Josh Duggar was granted release from jail as he awaits trial for charges of receiving and possessing child pornography.

U.S. District Judge Christy Comstock on Wednesday ordered Duggar, 33, confined to the home of family friends who have agreed to serve as custodians during his release. People reports that he will be placed into their custody on Thursday.

According to the magazine, Judge Comstock could not in “good conscience” allow Duggar to go home to his pregnant wife, Anna, and their six children. He was, however, granted permission to see his children if Anna is present. He reportedly may not see any other minor child, including his nieces and nephews.

The judge also barred Duggar from any Internet-accessible devices.

Duggar was arrested last Thursday and indicted on one count of receipt of child pornography and one count of possession of child pornography on Friday. He pleaded not guilty to both charges.

Prosecutors say some of the material Duggar allegedly possessed depicted the sexual abuse of children under the age of 12.

Duggar’s attorneys said they planned to defend his case “aggressively and thoroughly.”

“In this country, no one can stop prosecutors from charging a crime,” the attorneys said in a statement. “But when you’re accused, you can fight back in the courtroom — and that is exactly what Josh intends to do.”

A federal judge set a May 5 detention hearing and a July 6 trial date. If convicted, Duggar faces up to 20 years of imprisonment and fines up to $250,000 on each count.

Duggar starred on TLC’s “19 Kids and Counting” until it was pulled from the network in 2015 over revelations Duggar had molested four of his sisters and a babysitter. Duggar’s parents said he had confessed to the fondling and apologized.

Duggar previously apologized for a pornography addiction and cheating on his wife.