The scientist said he deleted child porn images after accidentally downloading them. (Representational)

A scientist working at NASA's Johnson Space Center has been charged with five counts of child porn possession, the media reported citing court documents.

Scott Roger Messenger, 50, was arrested on July 23, Khou 11, a CBS-affiliated television station reported on Tuesday. The charges were linked to a 2018 investigation that the Webster Police Department in Massachusetts conducted.

According to the investigation, Messenger possessed child porn and shared hundreds of child porn images from his computer, said the report.

While Messenger said he deleted child porn images after accidentally downloading them, a review of forensic results by the police found eight "obvious" child porn images and hundreds of child erotica images were downloaded.

Messenger had anti-forensic software on his computer, which was used to delete explicit search terms, the police found.