American hacker Ryan Hernandez has plead guilty to hacking charges after repeatedly accessing and sharing confidential business information from Nintendo.

He has agreed to pay Nintendo around $385,000 ($US260,000) for leaking commercially sensitive information online.

The 21-year-old began hacking Nintendo in 2016 when he and a friend successfully phished the credentials of a Nintendo employee.

Hernandez used the login details to sniff around Nintendo’s servers, accessing video game files and other business information, like details about the forthcoming Nintendo Switch console, which he leaked to the public.

The FBI first knocked on the door of Hernandez’s family home in 2017, warning him of the consequences of his hacking activities.

Hernandez promised he would stop breaking into Nintendo’s files.

And that was that – at least until around mid-2018, when US prosecutors say Hernandez returned to his hacking operation and sharing Nintendo software developer kits, inside info on upcoming releases, and network vulnerabilities online.

Finding their previous warnings unheeded, the FBI raided Hernandez’s home in June 2019, seizing his Macbook, external hard drive, Nintendo development kits and consoles.

Along with the ill-gotten Nintendo files, authorities found thousands of images and videos of child exploitation stored in a folder called ‘Bad Stuff’ on one of his drives.

The plea deal Hernandez struck had prosecutors recommending a three-year prison sentence and requiring Hernandez to register as a sex offender.

Hernandez will be sentenced in April and could face up to 5 years in prison for hacking offences, and 20 years imprisonment for possessing child exploitation material.