MADISON — A former police officer from this Morris County borough won't go to prison after admitting to possessing nude images of a 17-year-old girl he had texted with. 

Chad Rybka, 33, a police officer since 2007, resigned from his job and agreed to never seek public employment in the state after pleading guilty Thursday to third-degree endangering the welfare of a child by possessing child pornography.

The Morris County Prosecutor's Office will recommend that a Superior Court judge sentence Rybka to a period of probation and continued psychological counseling, the Daily Record reported.

Third-degree crimes in New Jersey are punishable by three to five years in prison, but those convicted of third-degree crimes generally avoid prison terms if they have clean records.

The cop, a married man who lives in Bernards, had a months-long online relationship with the teenage girl. He messaged her on Twitter requesting nude photos over a time span of four to six months, prosecutors said Thursday.

On Feb. 23, the police in Brunswick, Ohio, discovered the minor was interacting with an adult male, who was later revealed to be Rybka. Officials in Ohio reported the situation to the Madison Police Department, who then alerted prosecutors.

An investigation by the Morris County Prosecutor's Office revealed that Rybka was in possession of a number of nude images of the teenage girl. 

"The Madison Police Department... has zero tolerance for any police officer misconduct that adversely effects the Borough’s reputation or the integrity of the Police Department,” Madison Chief Dachisen said Thursday in a prepared statement.

Rybka's attorney, Gerard Hanlon, did not immediately return a call for comment, but was quoted by the Daily Record as saying that the case is "a real loss to the department because he was a terrific officer and slated for great things."

In 2012, Rybka was honored with Madison Police Department's DWI Top Gun Award, an award given to the officer that makes the most impaired driver arrests, and was recognized for his presentation on the dangers of drunk driving.

More From New Jersey 101.5 FM