For almost three decades, 81-year-old David Lidstone has lived in the woods of New Hampshire along the Merrimack River in a small cabin adorned with solar panels. He has grown his own food, cut his own firewood, and tended to his cat and chickens.

But his off-the-grid existence appears to be at risk.

VETERAN SEARCHES FOR NAVY SHIP HAT FROM DESERT STORM THAT WAS LOST IN NEW HAMPSHIRE RIVER

"River Dave," as he's known by boaters and kayakers, is behind bars after being accused of squatting for 27 years on private property in Canterbury. As the owner of the land seeks to tear down the cabin, Lidstone has been jailed since July 15 on a civil contempt sanction.

"You came with your guns, you arrested me, brought me in here, you’ve got all my possessions. You keep ’em," he told a judge at a hearing Wednesday. "I’ll sit here with your uniform on until I rot, sir."

Jodie Gedeon, an avid kayaker who befriended Lidstone about 20 years ago, is working with other supporters to help him, including organizing a petition drive and collecting money to cover property taxes.

"He’s just a really, really, big caring guy, and just chooses to live off the grid," she said. "It really is about humanity, it really is about compassion, empathy ... he’s not hurting anybody."

KAROLINE LEAVITT, FORMER TRUMP, STEFANIK SPOKESWOMAN, RUNNING FOR CONGRESS IN NEW HAMPSHIRE

Merrimack County Superior Court Judge Andrew Schulman agreed that Lidstone isn’t hurting anyone, but said the law is clearly on the landowner's side.

"You’re doing your own thing in the ‘Live Free or Die’ state, so there’s a lot of sympathy to you for that," he said. "But there’s a lot of weight on the other side of the balance sheet, and not just about what the (landowner) wants to do with the land, but the weight I feel to uphold the judgment of the court and the rule of law."

Gedeon and other supporters came out to a town selectboard meeting on Monday. Board members said the town currently has no standing in the property dispute.

But even if there were a way to allow Lidstone to stay, it would be an uphill battle. His home is in violation of local and state zoning and environmental regulations, and there is no access to a road.

"You guys are in a quandary. So are we," selectman Robert Steenson said.

The woodlot Lidstone calls home is just a few miles away from Interstate 93. But it's hidden by the trees; it's on 73 acres that's been used for timber harvests. The property has been owned by the same family since 1963. There are no plans at this time to develop it.

Lidstone has claimed that years ago, the owner gave his word — but nothing in writing — allowing him to live there. But in the eyes of the current owner, he's a squatter and needs to go.

Property owner Leonard Giles, 86, of South Burlington, Vermont, didn’t even know Lidstone was there until the town administrator found out in 2015 and told him, expressing concern "with regard to the solid and septic waste disposal and the potential zoning violations created by the structure," according to Giles’ complaint in 2016.

COAST GUARD RESCUES 3 OFF NEW HAMPSHIRE FOUND CLINGING TO VESSEL: REPORTS

The judge suggested Wednesday that Giles and town officials work with a mediator, but Giles' lawyer said the logistics would be too daunting.

"We’ve got to recognize the fact that this was a managed woodlot, with income which is supposed to support my elderly client in his retirement. At some point, how far is he supposed to go in order to turn his woodlot into a habitable lot for somebody else who’s there trespassing?" said attorney Lisa Snow Wade. "He just wants his land back."

Lidstone, who doesn't have an attorney, insisted his cabin is a hunting and fishing camp, not a home.

"Why do you need a road to it? Do you think I’m an idiot? You’re going to put a septic tank in for a hunting camp?" he said.

He also argued that Giles doesn’t own the property but is being pressured by the town.

"He’s a heck of a nice old man, I’ve talked with him a couple of times. This is not his fault, this is not my fault," he said. "It’s lying, cheating corrupt judges like you that are stepping on little people like me. But I’m telling you, sir, you step on me, I’m going to bite your ankle."

Lidstone, a bearded, small-framed, spritely man, has resisted efforts to leave since a judge issued an order for him to vacate in 2017. Following that, both sides had attempted to reach some sort of agreement for him, but were unsuccessful, according to court documents.

Currently, Lidstone can be released if one of three things happen: he agrees to leave, the cabin is demolished by Giles, or 30 days have passed since he was jailed. Another hearing will be held next week.

He hasn't had any other contact with law enforcement, unlike the case of a man in Maine called the " North Pond Hermit," who also lived in the woods for nearly three decades and pleaded guilty in 2013 to multiple burglary and theft charges.

Over the years, Lidstone, a U.S. Air Force veteran and a father of four who has made money as a woodsman, has been known to invite kayakers and boaters into his home, sharing stories about his life in the wild.

The wooden, two-level A-frame cabin was profiled by a local television show in 2018. There is a small, cluttered kitchen with pots hanging from the ceiling, some appliances, and curtains on the windows. His porch has a footstool with a base made of stacked beer cans. He converted a wood stove into a beehive. He's attached lights, a mirror and a pulley for a clothesline to logs supporting the cabin. There are piles of firewood.

Nearby is a gravel path leading to vegetable garden plots outlined by logs and some berry bushes. Lidstone gets his water from a stream.

Lidstone's decision to live in the woods is "exactly the lifestyle he wants," said his brother, Vincent Lidstone, 77, of Lafayette, Georgia.

"What they're doing to him isn't right for anybody, whether he's my brother or anybody's brother," he said. "He's 81 years old. Leave him alone."

Vincent Lidstone said he lost touch with his brother through the years, but described how the two of them and a cousin enjoyed spending time outdoors. They grew up in Wilton, Maine.

"We lived in the woods," he said. "We camped, fishing, hunting. The three of us did everything together for a lot of years."

CLICK HERE TO GET THE FOX NEWS APP

It's unclear where Lidstone would go. Vincent Lidstone said he doesn't have the resources to help him. The Associated Press reached two of his three sons, who said they haven't been in touch with their father recently. His daughter didn't respond to a message seeking comment.

Gedeon said the matter hasn't been discussed by her group yet.

"We want to see him be able to live out his remaining years where he is," she said.