BANGOR, Maine — A group of visitors that come to town every May create quite a spectacle when they bed down for the night.

“They all kind of meet up for about an hour, and they have this social thing where they make this doughnut in the sky — it’s almost like a tornado of birds — and they start getting closer and closer to the chimney until all at once they go down [it],” Tony Sohns, co-owner of the Rock & Art Shop downtown, said of the migrating chimney swifts. “It’s quite an amazing thing.”

The flock of small urban songbirds in Bangor is part of a diminishing flock that arrive in the area every May en route to their North American breeding grounds. They will be in town again in August when they migrate to South America for the winter, birder Ted Allen of the Merrymeeting Audubon said Sunday.

“Everyone thinks they’re bats,” Sohns said. “They make a lot of noise, and they’re flying around … just before dark,” which is when bats typically come out to feed.

Bangor Land Trust member Bob Milardo has been watching the birds for years and has been leading walking tours for the last two years to educate others about the petite blackbird.

“Any night there could be a hundred, or 200 or thousands,” he said Sunday. “On Monday [May 19], there were 2,000. They went in [the chimney] within a minute. It’s really amazing.”

How long the chimney swifts will be downtown in large numbers is unknown, but Milardo is predicting “they will dissipate in a week or so.”

On Sunday night, the number dropped to about a hundred.

Once the birds mate, the pair chose one chimney and nest, Milardo said.

The chimney swifts’ display was enough to stop some people on the street, said City Councilor Josh Plourde, who just a few days ago shot a video with his cellphone of the birds entering their nighttime accommodations.

Plourde was driving downtown when he saw Sen. Geoff Gratwick, D-Bangor, and Lucy Quimby, Bangor Land Trust president, standing on the sidewalk looking up, and he stopped. He posted the video on his Facebook page.

“I had heard Tony [Sohns] talking about them, but I never actually saw them for myself,” Plourde said. “Someone commented on the video that there is a similar place in Brewer.”

Chimney swifts spend almost their entire lives in the air; they land only when they are roosting or sitting on a nest, which they attach to the side of chimneys using gluey saliva.

The migratory birds originally lived in hollow trees but adapted to live in brick chimneys over the years, which are slowly decreasing as modern construction uses lined chimney chutes, Allen said. The loss of their roosting habitat has contributed to a decline in the population, he said.

“The problem is their natural homes have been objects of widespread destruction,” Allen said. “We have noticed over the last four years a drop in chimney swifts numbers in Portland at Maine Med, where three years ago 1,600 would roost.”

Today, the number that roost at the Maine Medical Center is closer to 400 to 500, he said. Allen also has been counting the number of chimney swifts in Auburn, Lisbon and New Gloucester. “I’ve found that the numbers have dropped on the order of 33 percent,” he said.

Milardo said the migrating birds in Bangor once used a home up by the Bangor Water Tower.

“They used to roost up there. But they took down the chimney, so they had to find someplace else,” he said.

People, including some schoolchildren in Brunswick, have taken steps to protect the roosts of chimney swifts, which are protected by the federal Migratory Bird Treaty Act.

When the old Brunswick High School was demolished in 2009, a roost said to be the largest in Maine was lost. But students, residents and the Merrymeeting Audubon raised money to construct a new tower for roosting at the new elementary school.

“What we did — and this was our major mistake — is we put together a cinder block chimney,” Allen said.

The first year, the birds circled the area around the former 60-foot chimney but were not interested in the new home just a couple hundred feet away, and none stayed. This year, 13 used the roost, and Allen is hopeful more will return with time. He is playing a recording of their songs at the school to try to attract them.

Before the chimney was removed, people would go to the school to watch the spectacle of them entering it. The same is true at other migration locations in the county, Sohns said.

“In other cities, people show up with lawnchairs and drinks and video cameras,” the downtown business owner said. “It’s huge. It’s special and people line up to see it.”

“Downtown Bangor is wild,” Milardo said, saying people just need to slow down a little and take time to explore the area’s wildlife.

He will be leading a walking tour June 13 to visit breeding pairs of whippoorwills.

“They’re interesting because their song is really cool, and they’re the last three pairs in the greater Bangor area,” Milardo said. “Their song is their name — ‘whip-poor-wills, whip-poor-wills, whip-poor-wills’ — repeated over and over.”

Plourde said people interested in seeing the chimney swifts should head downtown at dusk and look toward the roof of 6 State St.

“If you’re in downtown, just look up,” he said.