A state official was called in to escort an unexpected visitor out of City Hall Tuesday.

An endangered brown bat found its way into the city clerk’s office and hung out — literally — at the window until Scott Darling from the Vermont Department of Fish & Wildlife came to collect it.

City Clerk Henry Heck said at first he thought some sort of giant Japanese beetle had gotten into his office when he saw the bat hanging off the inner screen. While some people might have opted to forcibly shepherd it out with a tennis racket or other handy object, Heck said he believes in a more compassionate approach.

“I catch spiders at home and set them free,” he said. “I would prefer not to kill one of these animals. ... I pulled the screen out and opened the window. It was pretty cold. He had no desire to leave his warm little hideout he was clinging to.”

A call to the state brought in Darling, a wildlife biologist and bat specialist. Darling said the bat, which he identified as a female brown bat, went quietly, not putting up any resistance when he scooped it up into a “bat bag.” Darling applauded the staff at City Hall for how they handled the situation.

The bat went to the local Fish & Wildlife office, where another bat-specialized biologist, Alyssa Bennett, looked it over and released it near City Hall.

“We definitely want to try to let wildlife be wildlife and get them back out there,” Bennett said. “I suspect she’s either near where she lives or not too far away.”

The population of brown bats in Vermont has dropped by about 90 percent in recent years with the advent of white-nose syndrome, a fungal infection that causes bats to wake too early from hibernation and then starve to death. Bennett said the disease continues to be a problem and state officials continue to find dead and dying bats.

“Some of them are making it through,” she said. “We’re watching them pretty closely to try to find out what’s so special about individuals living through multiple winters with this disease.”