A Wisconsin fugitive wanted on child sexual assault and pornography charges hid out for more than three years in a makeshift bunker that he outfitted with solar panels, a generator and a DIY water filtration system, according to a new report.

Jeremiah Button, 44, vanished in February 2016 just weeks before his scheduled trial.

But several months ago, local hunter Thomas Nelson spotted a bunker with a log door carved into an embankment on state land in the township of Ringle, west of Wausau, local outlet WSAW-TV reported.

Last Friday, curiosity got the best of Nelson and he decided to return to investigate.

“I pushed the door open, and I look inside and I can see canned foods, there’s little storage boxes, and I’m like … I gotta go in,” he said. “I come around the corner a bit and there he is, laying in his bed.”

Button moved a safe distance away, called the police and guided them to the bunker — prompting a 20-minute standoff between Button and deputies, according to the report.

But once it was over, Button was almost welcoming, and happy to finally have human interaction, Deputy Matt Kecker told the outlet.

“He told us that he was wanted through Portage County for numerous warrants,” Kecker said.

Authorities had no trouble getting Button to talk about how he’d survived humid summers and brutal winters in his wooded hideout.

The walls were covered with dusty cans of food and storage bins, the outlet reported. Miniature fans hung from the ceiling, and an old radio somehow still worked.

“He has solar panels up on the roof that power three car batteries inside the structure,” Detective Lt. Jeff Stefonek told the outlet. “And from those three car batteries he has running to LED lights and radios and cooling fans, all sorts of electronic equipment, some of it left intact for its intended purpose, and other things he took apart to fit the needs he had.”

He also had a bike-powered generator, and a contraption for filtering water.

“He was not only surviving, but thriving in this structure through all of the different supplies he was able to find,” Stefonek added. “Not a lot of air comes in from the outside, and it was a small enough space that he was able to survive the winters obviously, and keep himself warm, and it’s cool down there this time of year, and it is stocked full of all of the items that he was able to pilfer from the Marathon County landfill by sorting through garbage.”

Now Button is in custody on a $100,000 cash bond, awaiting a pretrial conference on Sept. 16.

Stefonek said Button may even prefer his new digs.

“Given the chance,” the lieutenant told the station, “I think the majority of the US population would choose prison over this type of isolation from human contact.”