Former reality TV star Josh Duggar has been released from an Arkansas jail as he awaits trial on federal charges of downloading and possessing child pornography.

Magistrate Judge Christy Comstock on Wednesday ordered the 33-year-old man let go from the Washington County Jail and confined to the home of family friends who have agreed to be his custodian until his July 6 trial. The court also prohibited Duggar from using any internet-accessible devices.

There were no reports or indications that Duggar had to pay a bail to be set free.

The former cast member on the long-running TLC show “19 Kids and Counting” was indicted by a Springfield, Arkansas, grand jury last Friday, a day after he was taken into custody by federal Marshals.

He has pleaded not guilty to the charges and faces up to 20 years in prison and fines of at least $250,000 if convicted.

During a four-hour court hearing conducted over Zoom, the judge said that, during his release, Duggar could have contact with his children only with his wife present but added that Duggar could not be around any other minors, including other family members.

Other conditions imposed by the judge included Duggar wear an electronic monitoring device and not watch any pornography or erotica. Duggar also must report regularly to a probation officer.

“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.

“You won’t, your honor, thank you very much,” responded Duggar.

Federal prosecutors fought to keep Duggar locked up, arguing that his previous admission to molestation was 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.

But the judge answered their concerns, saying: “I’m going to find that the United States has not presented clear and convincing evidence that no release condition or set of conditions would reasonably assure the safety of the community.”

Duggar is charged with using “the internet to download child sexual abuse material,” according to a statement last week by the U.S. attorney for the Western District of Arkansas.

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, which was raided later that year.

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,” said Justin Gelfand, an attorney for Duggar.

The TLC show that featured Duggar was taken off the air in 2015 over revelations he had molested four of his sisters and a babysitter when he was a teenager. Duggar’s parents said he had confessed and apologized, although there were no criminal charges filed in the matter.

Later the same year, Duggar acknowledged a pornography addiction and that he had cheated on his wife following a data breach on the website Ashley Madison which revealed credit card transactions in his name.

“19 Kids and Counting” had a seven-year run on TLC and followed Jim Bob and Michelle Duggar, a devout Baptist couple who were raising 19 children in Tontitown, Arkansas.

Previously Duggar had come on the radar of authorities for other legal troubles.

Porn actress Danica Dillion filed a lawsuit against him in November 2015 for allegedly assaulting her in a Philadelphia strip club, although she dropped the lawsuit the following year, according to reports.

Duggar was also the subject of “a civil lawsuit filed against him for real-estate fraud,” according to reports.

The current case against Duggar is being prosecuted as part of the U.S. Justice Department’s Project Safe Childhood, a nationwide initiative to combat the growing epidemic of child sexual exploitation and abuse, according to a statement by U.S. Attorney David Clay Fowlkes of the Western District of Arkansas and Special Agent Jack Staton of the Homeland Security Department.

Information provided by The Associated Press was used to supplement this report.