An Indiana town marshal figured out just what to do when he spotted a horse wedged in a tree in subzero temperatures earlier this week: He grabbed a neighbor's chainsaw and went to work to free the animal, according to reports.

Dan Ball is the town marshal in Winfield, a town of about 2,2000 residents some 15 miles south of Gary.

“When I pulled up and saw it, I was like, ‘Oh boy — what are we going to do here?,’” Ball told the Chicago Tribune.

HORSE HOISTED TO SAFETY AFTER GETTING STUCK IN DUMPSTER

He feared the horse might die because it collapsed at one point and was growing weak with the temperature hovering near minus-20 degrees, Ball told the Northwest Indiana Times.

“I thought we were going to lose the horse,” Ball told the Tribune.

But when a neighbor brought a chainsaw to the scene, Ball braved the frigid conditions for 45 minutes to cut away parts of the tree until the horse was able to pull free.

CLICK HERE TO GET THE FOX NEWS APP

“It looks like he is going to be OK,” Ball told the paper, adding that he too was fine and "thawed out" after being covered in sawdust and icicles.

The horse then managed to walk back to its barn and eat breakfast.

The Associated Press contributed to this report.