CONCORD, N.H. (AP) — A former hermit in New Hampshire who went back to live on the wooded property he was ordered to leave realizes that his time there is drawing to a close.

David Lidstone, who just turned 82, is scheduled for a contempt of court hearing Thursday in his tug-of-war with a Vermont landowner over a patch of forest near the Merrimack River that he’s called home for 27 years.

A judge issued an injunction in 2017 for “River Dave” — as Lidstone is known — to leave after the landowner, Leonard Giles, sued him. But there have been delays in the case: Besides the pandemic, Lidstone didn’t always show up for court and he’s been in and out of jail over the last year as he resisted the injunction.

“I know my days are numbered here,” he told The Associated Press in a recent interview, a day after he showed up in court to plead not guilty to a trespassing charge on the land. “Eventually I’m going to have to move.”

Lidstone, who became known as a friendly face to kayakers and an advocate for keeping the river clean, wasn’t sure what he would do next or where he would go, even though he’s had offers of other places to live and more than $200,000 in donations.

Lidstone, a logger by trade, is accused of squatting in a rustic cabin he built on the land in Canterbury. The wooden, two-level A-frame cabin had solar panels, a small, cluttered kitchen with pots hanging from the ceiling, and curtains on the windows. His porch had a footstool with a base made of stacked beer cans. He converted a wood stove into a beehive. He attached lights, a mirror and a pulley for a clothesline to logs supporting the cabin. He also had a vegetable garden.

But while Lidstone was in jail over the property dispute, his cabin burned down in August as it was being dismantled at Giles’ request. The fire chief said the fire was accidental.

Lidstone, who has been representing himself, was ordered to pick up his remaining possessions and leave. An outpouring of support followed. He didn’t think he could go back to being a hermit and lived with some friends. But by December, he had turned a shed that survived the fire into a makeshift home, outfitted with a wood stove.

Court records say the undeveloped property has been in the Giles family since 1963 and is used for timber harvests. Lidstone had claimed that years ago, the current owner’s father gave his word — but nothing in writing — allowing him to live there. He also has disputed whether he’s on the property in the first place.

Lidstone was given permission last year to hire a surveyor to give him “peace of mind,” a judge said, but he has been unable to get someone to come out yet.

It hasn’t been easy to serve Lidstone with a notice to appear in court. There’s no road access to the property, which is about a mile and half (2.4 kilometers) into the woods. In January, one process server slipped, fell down an embankment, and injured his leg in his attempt to reach Lidstone at the woodshed, according to a motion filed by Giles’ attorney.

“Mr. Lidstone has been painted as a sympathetic figure in the media because he is an 81-year-old veteran wanting to live a romanticized life off-the-grid,” another plaintiff’s motion from December said. “That does not excuse his conduct of returning to Mr. Giles’ land, again, and again, and again.”

Giles has asked a judge for compensation from Lidstone to cover his legal costs since 2017 and cleaning up the property. Lidstone hasn’t agreed to that.