A former Yahoo software engineer pleaded guilty to hacking several thousand user accounts in search of sexual images and videos, according to federal prosecutors.
Reyes Ruiz, of Tracy, California, just outside San Francisco, pleaded guilty to federal charges of computer intrusion on Monday and admitted to mostly targeting younger women, the Department of Justice said.
(MORE: Woman accused of Capitol One data breach to face additional charges)Ruiz, 34, was accused of using his access through his work at the company to hack into about 6,000 Yahoo accounts, including those belonging to female colleagues and friends, the DOJ said in a statement.
After compromising the victims' Yahoo accounts, Ruiz would then access the their iCloud, Facebook, Gmail, DropBox, and/ or other online accounts "in search of more private images and videos," the statement said.
"Ruiz cracked user passwords, and accessed internal Yahoo systems to compromise the Yahoo accounts," the statement said. "He made copies of images and videos that he found in the personal accounts without permission, and stored the data at his home."
"After his employer observed the suspicious account activity, Ruiz admitted to destroying the computer and hard drive on which he stored the images," it added.
(MORE: Hackers gain access to London police's Twitter account, request release of rapper)Ruiz was indicted by a federal grand jury in April.
He was released on the conditions of an unsecured $200,000 bond and is scheduled for sentencing in February.
Ruiz faces up to five years in prison and a $250,000 fine, plus restitution.
ABC News' Alex Stone contributed to this report.