The man made copies of images and videos that he found in the personal accounts without permission

A former Yahoo software engineer has pleaded guilty to hacking personal accounts of thousands of Yahoo users searching for their sexual images and videos.

In pleading guilty, Reyes Daniel Ruiz, 34 admitted to using his access through his work at the company to hack into about 6,000 Yahoo accounts, the US Department of Justice said in a statement on Tuesday.

"Ruiz cracked user passwords, and accessed internal Yahoo systems to compromise the Yahoo accounts.Ruiz admitted to targeting accounts belonging to younger women, including his personal friends and work colleagues," said Department of Justice.

Yahoo was yet to comment on the development.

He made copies of images and videos that he found in the personal accounts without permission, and stored the data at his home.

Once he had access to the Yahoo accounts, Ruiz admitted to compromising the iCloud, Facebook, Gmail, DropBox and other online accounts of the Yahoo users in search of more private images and videos.

After his employer observed the suspicious account activity, Ruiz admitted to destroying the computer and hard drive on which he stored the images.

Ruiz from Tracy, California, was indicted by a federal Grand Jury on April 4 and was charged with one count of computer intrusion. His sentencing hearing is scheduled for February 3, 2020.