MADISON, Wis. -

A former sheriff's deputy has resigned and is facing charges following an investigation into an alleged relationship with an inmate, according to court documents.

Jeffrey C. Hilgers, 42, of Madison, was charged with second-degree sexual assault by correctional staff and seven counts of possession of child pornography in Dane County Court Thursday morning.

The criminal complaint said Hilgers was the deputy assigned to the Dane County Jail unit where a 43-year-old Madison woman was an inmate from November to December last year. The woman was released from jail but was on an electronic monitoring program when she and Hilgers allegedly began a sexual relationship after seeing each other in a grocery store. The woman was an inmate during six weeks of the alleged relationship.

During the investigation, officers found images of child pornography on computers in Hilgers' home, the complaint said. There were 44 files that reportedly contained child pornography.

Hilgers resigned before an administrative hearing scheduled for Aug. 14, 2013, Schafer said.