The long grass sways as a soft summer wind sweeps under two strange structures, blowing with it the faint smell of manure, in an otherwise empty Ontario field. Under one, which looks like a tiny house on stilts, Myles Falconer carefully removes five barn swallow chicks from their nest to have them weighed, measured and banded.

"The chicks are too young to get ornery," Falconer says as he handles the tiny songbirds, "but we wouldn't want to do this in a few weeks."

The biologist is part of a small team with Bird Studies Canada that is researching barn swallows in an effort to understand why their population in Ontario has plummeted — down 65 per cent between 1966 and 2009, according to the provincial government.

A drop in population

No one really knows what's causing the decline, but researchers suspect habitat loss for the small bird, the striking aerial insectivore with an iridescent steel-blue back, rusty red forehead and throat, and distinctive forked tails.

That is the focus of a unique experiment Bird Studies Canada launched two years ago in Townsend, Ont., where the province had declared a parcel of land surplus, which meant that eight dilapidated buildings — some of them barns — located there had to be taken down.

Suspecting some of those building might house barn swallow nests, Infrastructure Ontario, which manages thousands of government-owned properties across the province, hired environmental consulting firm Cole Engineering to conduct a land survey.

"If we're taking down the barn, we would be breaking the law if we didn't do habitat compensation," says Lisa Myslicki, of Infrastructure Ontario.

Barn Swallows

Chris Parent with Cole Engineering poses next to his custom-built barn swallow nesting habitat in Townsend, Ont. (Nathan Denette/Canadian Press)

Under Ontario's Endangered Species Act, animals considered a species at risk, such as barn swallows, and their habitat must be protected.

After the barn swallows flew south in the fall of 2015, Cole Engineering — with funding from the Ontario government — designed and built the two structures, which now house a total of seven active bird nests.

As adult barn swallows whip around the area, Chris Parent, a biologist with Cole Engineering, points out the intricacies of the birds' buildings he helped design.

Parent examined the old barns, which have since been demolished, to figure out where the birds were nesting. In his design, he incorporated three styles of nests inspired by their locations in the old barn: ledges, cups and cross structures.

"The idea being the barn swallows would select for themselves what would serve as the best nesting site," Parent says. This is another aspect of the study the biologists are monitoring. So far, the birds seem to prefer the ledges and cups.

The two new birdhouses are different, one with a longer overhang than the other, which provides different temperatures for the birds, Parent explains, replete with a ventilation system.

Keeping out predators

And there's a security system. Four large galvanized steel cones protect the birds from predators, at least the terrestrial kind, designed with raccoons in mind.

"Picture a raccoon going up one of those pillars, using three legs to hold on and one trying to reach around that cone," Parent says. "Well, the dimension of that cone is approximately five centimetres beyond the grasp of an average raccoon."

There are five other similar sites in Ontario, says Kristyn Richardson, a biologist with Bird Studies Canada, but they usually only have one nesting pair. But she says the two structures in Townsend are the most successful so far.

In addition to those six sites, she says, Bird Studies Canada is also studying about 20 other barns with nests.

The researchers are also monitoring the birds' movements, Richardson says.

Barn Swallows

The Ontario Ministry of Infrastructure has teamed up with Cole Engineering and Bird Studies Canada to build unique nesting shelters to try to boost the barn swallow population. (Nathan Denette/Canadian Press)

Last summer they captured barn swallows and placed "nano tags" on them, which emit a radio frequency. With four towers set up to detect the signals and a hand-held receiver, they discovered the birds stay close to the nests as they feed, never flying farther than 200 metres from home.

And last fall, they were able to trace the barn swallows' flights south. First, they flew to Long Point, Ont, a peninsula that juts deep into Lake Erie, where they hung out in the marshes for a bit, before their long journey south to the Amazon basin, Richardson says.

With ankle bands, the researchers hope to find some swallows that return to the nesting grounds as proof for their hypothesis that the birds return to the same area year after year. It's still early days in the world of research, but they're also studying survival and dispersal.

"For a bird that used to be so common," Richardson says, "it's a sad and alarming thing that we're losing so many of them this quickly."