September 4, 2020 | 1:21pm

A Minnesota man was pinned under a tree for more than four days, surviving by eating plants and insects before being rescued with severe leg injuries, according to a report.

Jonathan Ceplecha, 59, an Army veteran, was cutting down trees on his land in Redwood Falls when one of them came crashing down on him, the Minnesota Star Tribune reported.

“In a split second … both of his legs were suddenly pinned down under an immovable log and his upper torso was now semi-twisted as he sat upright on the ground,” according to the schoolteacher’s GoFundMe page.

“His legs were broken instantly and he was in enormous pain, but with no phone on him and because he lives alone, there was nobody to hear or see him,” it said.

Ceplecha “ate plants and insects within arm’s reach, drank sweat and rainwater that he collected in his clothes, and covered his head in his shirt during the nights to keep the insects off as he slept,” the page added.

He “kept his sanity” by breaking down each day into hours, then dividing each hour into five-minute segments as he prayed and meditated during the ordeal, according to the Star Tribune.

Ceplecha’s ex-wife finally discovered him after his family became concerned about his absence. His school had also asked for a welfare check when he failed to show up for the first day of class Monday.

The Redwood County Sheriff’s Office responded Monday afternoon after receiving a 911 call. It took two hours to free Ceplecha, who was airlifted to a hospital, where doctors expect to save his legs — though his feet are in bad shape.

“He is a true survivor in every sense of the word,” the GoFundMe page said.