A Barnegat Township man has been arrested on child pornography charges following a joint four-month investigation by the Ocean County Prosecutor’s High Tech Crime Unit and the Bergen County Prosecutors Office.

Eric Underwald, 27, was arrested Thursday morning for the possession and distribution of child pornography, according to Ocean County Prosecutor Joseph D. Coronato.

Coronato said the investigation revealed Underwald was was sharing child pornography files.

Authorities executed search warrants at Underwald’s Windward Drive residence, as well as a prior  residence at Deer Run Drive, also in Barnegat Township.

Barnegat Township Police Department assisted with the service of the search warrant.

When authorities advised Underwald of his arrest he attempted to flee and exit the home through a second floor window. Coronato said the quick actions of Barnegat Township Police officers prevented Underwald from injuring himself and accessing a number of knives and swords he had hidden in his bedroom.

Underwald was taken into custody and transported to Barnegat Township Police Department where summonses were issued for fourth-degree resisting arrest and fourth-degree hindering.

After making several suicidal statements during arrest and processing, Underwald was transported by Barnegat Police officers to Southern Ocean Medical Center for evaluation.

Authorities recovered  child pornography still pictures and movie files from Underwald’s computer and multiple electronic storage devices, Coronato said.

A forensic preview by the Ocean County High Tech Crime Unit of Underwald's computer showed he was  in possession and sharing child pornography photos and movies with other individuals on the internet, said Coronato.

Underwald was charged with two counts of second-degree distribution of child pornography and one count of fourth-degree possession of child pornography.

Underwald's bail was set at $75,000 with no 10 percent option.