A 35-year-old former Lincoln County Deputy convicted of having sex with a 15-year-old girl will spend five years in prison, followed by six years extended supervision.

Zachary Dorr was convicted of second degree sexual assault of a child in December after pleading guilty to the charge during a plea deal. Two similar charges were dismissed in exchange for the plea.

According to a news release from the Marathon County Sheriff's Department, Dorr was accused of having sex with a 15-year-old May 9, 2015 at his Wausau home. According to court documents, Dorr brought the girl to a coworker's wedding as his date. The girl reportedly told people she was 21-years-old. According to court documents, guests, including some that worked in law enforcement, didn't believe the girl.

During Dorr's first court appearance in Marathon County, the prosecutor said Dorr eventually admitted he had sex with a girl he knew was only 15 years old.

"When confronted about this, the defendant initially tried to cover it up and said he brought a different woman to the wedding. Eventually the defendant admitted to exchanging photos with the victim. He confessed he had sex with her the very first night he met her after the barbecue. He admitted that the following weekend, they had oral sex in a park around noon in his car with her and also admitted to having oral sex with her after that wedding," argued Assistant District Attorney Molly Lawrence.

Dorr was arrested May 12, 2015. He resigned that week.

He will receive credit for 294 days already spent in custody.

Investigators said Dorr was off-duty at the time of the incident.