A Queens man accused of amassing a huge collection of child pornography depicting babies and children under the age of 10, and filming himself having sex with a dog, appeared in court on Wednesday for a pretrial hearing.

Vishal Lalbeharry, 30, walked into Queens County Criminal Court dressed in a grey suit and tie, and accompanied by an elderly couple believed to be his parents, to face Judge Stephanie Zaro.

Lalbeharry was arrested in April 2018 after a month-long undercover investigation. In January of this year, he was indicted on 17,725 criminal counts accusing him of promoting child sex abuse, possessing child pornography and recording more than a dozen videos showing him engaging in acts of bestiality with a dog.

Vishal Lalbeharry, 30, appeared in Queens County Criminal Court on Wednesday to face more than 17,000 charges related to a child pornography case

Lalbeharry was arrested in April 2018 after a detective identified his IP address as having allegedly downloaded 1,150 files containing images of children being sexually abused

'The defendant is alleged to have downloaded thousands of photos and videos of children as young as six-months-old being abused by adult men and women,' a press release from the Queen District Attorney's Office stated. 'In addition to the online images, the defendant allegedly recorded himself having sexual relations with an animal.'

Lalbeharry's defense attorney, Todd Greenberg, told DailyMail.com by phone that he and a prosecutor discussed the possibility of reaching a plea deal before the case goes to trial.

Lalbeharry was indicted in January on 17,725 criminal counts accusing him of promoting child sex abuse and possessing child pornography

'We hope to have some type of disposition,' Greenberg said.

Lalbeharry is due back in court for another status conference on August 23.

According to the prosecution, a detective conducting an online investigation on March 27, 2018, identified Lalbeharry's IP address as having allegedly downloaded 1,150 files containing images of children being sexually abused.

Some of the files had the titles 'Babies F***ed,' 'Judyan 04,' '2006 Tara 7 yr' and others.

'Some of the photos showed babies actually being penetrated anally and vaginally by adult men,' the press release from the district attorney's office read.

Between March and April 2018, Lalbeharry’s computer was found to have been active on a network acquiring more than 10,000 photos and videos of children under the age of 10 being sexually abused.

When questioned after his arrest, Lalbeharry was quoted as telling police that some images of child pornography ended up on his computer while he was downloading ‘regular porn,’ and that he had seen them 'by mistake.'

Police seized four laptops, five hard drives and four cell phones from his room. A forensic analysis of Lalbeharry’s confiscated electronic devices allegedly uncovered thousands images of children - from infants to 10-year-olds - with their genitals exposed and being sexually assaulted in numerous ways.

Lalbeharry was accompanied in court on Wednesday by an elderly couple, believed to be his parents, and his defense attorney, Todd Greenberg

'The images accumulated by this defendant allegedly contained some of the most horrific ways imaginable to sexually abuse a child - even babies were defiled,' Queens District Attorney Richard Brown stated at the time. 'The children are real people and they must live with the scars on their bodies as well as in their memories forever.'

His collection of pornography also allegedly included 16 video recording showing the 30-year-old man having sex with a dog.

Lalbeharry was charged with 5,903 counts of promoting a sexual performance by a child as a sexually motivated felony; 5,903 counts of promoting a sexual performance by a child; 5,903 counts of possessing a sexual performance by a child and 16 counts of sexual misconduct.

If convicted of all the counts against him at trial, Lalbeharry faces up to seven years in prison.