LITTLE ROCK, ARK. -- A federal judge on Wednesday allowed former reality TV star Josh Duggar to be released as he awaits trial on charges that he downloaded and possessed child pornography.

Magistrate Judge Christy Comstock ordered Duggar, 33, confined to the home of family friends who have agreed to be his custodian during his release and prohibited Duggar from any Internet-accessible devices pending his July 6 trial on the child pornography charges.

Duggar was indicted on the federal child pornography charges on Friday, a day after U.S. Marshals arrested him. He has pleaded not guilty.

"I have full confidence in the United States Marshal Service to find you if you decide not to comply with these conditions of release, so don't make me regret this decision," Comstock said after a four-hour hearing conducted over Zoom.

"You won't, your honour, thank you very much," responded Duggar.

Duggar starred on TLC's "19 Kids and Counting" until it was pulled from the network in 2015 following revelations that 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.

Federal prosecutors cited Duggar's admitted molestation as a sign that he was a danger to the community.

"He has shown the court he has a history dating back 20 years that shows a sexual attraction to children and the deviousness of his activity," Assistant U.S. Attorney Carly Marshall said.

Comstock said that, during his release, Duggar could have contact with his children only with his wife present. But the judge said Duggar could not be around any other minors, including other family members.

Federal authorities said they began investigating after a Little Rock police detective found child pornography files were being shared by a computer investigators traced to Duggar. A federal Homeland Security agent testified pornographic images depicting the sexual abuse of children, including toddlers, had been downloaded in May 2019 by a computer at a car dealership Duggar owned.

Agent Gerald Faulkner said multiple child pornography files were found on the computer and that more than 200 images had been found on the computer that had been deleted.

Faulkner said the images downloaded were among "top five of the worst of the worst that I've ever had to examine."

A monitoring program that sent reports to Duggar's wife about his activity had been installed on the computer, but the images and videos were downloaded after software had been installed that allowed him to download them without being monitored, Faulkner said.

Duggar's attorneys had argued that he wasn't a danger to the community and has not tried to flee since authorities began their investigation two years ago.

"He has not left the jurisdiction, he has not left the country, he has not done anything at all other than continue to live his life in this judicial district where he has deep roots," Justin Gelfand, an attorney for Duggar said.