A Wisconsin child sexual-assault suspect who evaded authorities for three years before he was found living in a makeshift, solar-powered bunker carved into an embankment will appear in court Friday for a plea hearing.

Attorneys for the suspect, Jeremiah Button, reached a plea deal, but details of it were not immediately available. The hearing is set for Friday afternoon at a Portage County court, according to WSAU, citing court records.

Button, 44, was re-arrested in August after a hunter found him sleeping in a bunker in the township of Ringle west of Wausau, about 145 miles north of Madison. Button had disappeared in February 2016 just weeks before he was set to go on trial on child sexual-assault and child-pornography charges.

Jeremiah Button In this undated booking photo provided by the Portage County, Wisconsin, Sheriff's Office. Button was arrested on Friday, Aug. 9, 2019 after authorities said he had hidden out for more than three years in a bunker in a Wisconsin forest while on the run from child sexual assault and child pornography charges. Portage County Sheriff's Office via AP

The man who found Button, Thomas Nelson, said that he stumbled upon a log door carved into an embankment and when he pushed the unlatched door open and went inside he saw a man lying on a bed. Nelson said he left the bunker and called the police.

Button surrendered to authorities after a 20-minute standoff. He was taken into custody after deputies checked his information and learned that he had a felony warrant.

Marathon County Sheriff's Deputy Matt Kecker said Button told investigators that he had been building the bunker while his case was moving through the court. He said he stockpiled it with items he found in the Marathon County landfill and used solar panels and a pedal-powered generator to power LED lights, fans, and other electronic equipment.

According to a criminal complaint, Button allegedly sexually assaulted a child under the age of 12 from July 2006 to July 2012. The complaint also states that in February 2014, he was in possession of pornography involving a child under the age of 18.