Image copyright Nadine Lamoureux

For 15 years, Irish anthropologist Martina Tyrrell has studied the relationship between humans and animals in Arviat, an Inuit community on the west coast of Hudson Bay, where the townspeople are increasingly having to cope with a large and dangerous visitor - the polar bear.

It's a Sunday afternoon in mid-October. I'm standing near the cemetery at the eastern end of Arviat, with a handful of other people. All eyes are fixed on the newly formed sea ice where a polar bear bellyflops into the sea, hauls itself back on to the broken ice, and bellyflops again.

Inuit men and women, accustomed to close encounters with polar bears, seem to be no less in awe of this creature than I am. There are gasps of delight at the bear's antics, and informed discussion about its age, size and sex - and the reasons why it is behaving like this.

This is the seventh or eighth bear I have seen in as many days. Daily, I join townspeople on the dock near my house. Binoculars are passed around as we watch a mother bear and two yearling cubs on the snowy slope on the far side of the inlet.

I visit the wildlife officer one afternoon and find him at his huge office window, peering out at the sea ice through a telescope.

Image copyright Nadine Lamoureux

He stands aside so I can take a look. The same mother and cubs are on the sea ice, closer to town. But they are not alone. As the sub-adult cubs saunter ahead with their distinctive pigeon-toed gait, the mother fights off the advances of a male bear. She repeatedly rises up on her hind legs, showing the male her full size, in an attempt to ward off his advances. Cubs are often killed by male bears, so this mother is defending the lives of her offspring.

One evening, my friend Darlene Gibbons takes me to the town dump in her truck. Along with others in trucks, on snowmobiles and all-terrain vehicles, we suffer the smells of the rubbish and the neighbouring sewage lagoon, in order to watch the polar bears that come scavenging at this time of year.

People and polar bears have always lived side-by-side in this part of the world but in the past it was rare for bears to enter the town. Now, every summer and autumn, it's becoming an uncomfortable part of everyday life.

I first lived in Arviat, a community of 2,500 people in Canada's Nunavut Territory, for 10 months between 2000 and 2001, volunteering at the local school. I returned a year later to carry out a year of research for a PhD in anthropology. Arviat has been central to my professional and personal life ever since, and I go back as often as I can. As an anthropologist, I am drawn to the relationships between Arviarmiut - as the Inuit of Arviat are called - and the beluga whales, seals, caribou, and other animals that share their Arctic home. But it is the relationship between people and polar bears that fascinates me above all else.

Image copyright Lynne Rollin

Polar bears tower over humans, sometimes measuring as much as 12 feet from nose to tail. But Inuit believe that humans and bears have much in common. When bears rear up on their hind legs to sniff the air, to play, to attack or defend themselves, they resemble two-legged humans. And like Inuit, bears are at home on both sea ice and land. At sea they hunt the same marine mammal species for sustenance - humans and bears are rival predators at the top of the food chain.

For Inuit, these similarities suggest a close relationship. Bears are powerful spiritual beings that, in mythology, interact with everyone from the most powerful shamans to the most defenceless orphans. Arviat elder Johnny Karetak once told me that bear attacks on humans are neither arbitrary nor random. "Bears attack down the family line, like a curse," he said. "The bears would look out for one particular person. They knew him well."

In winter 2007, I spent 16 days at a polar bear hunting camp. The oldest hunter, the Rev Jimmy Muckpah, was 71 years old, a respected elder, Arviat's Anglican minister, and the most experienced polar bear hunter in town. One afternoon, a bear wandered into camp and scavenged some meat that lay on the sea ice. One of the younger hunters, a man in his 30s, began throwing small pebbles. These repeatedly hit the bear on the head, causing it to flinch, but otherwise not distracting it from the meat. Jimmy chastised the younger man for showing disrespect to the animal. Some hours later, when the younger man complained of a headache, Jimmy was not surprised. "You tried to hurt the bear's head," he said. "So the bear has given you a headache."

This illustrates another element of the relationship between Arviarmiut and bears. Encounters with bears are common, but harm to either humans or bears is rare. For the most part, each treats the other with caution.

Image copyright Lynne Rollin

Arviarmiut meet bears while hunting beluga whales and fishing for Arctic char in summer, while berry picking on the tundra in autumn, and during autumn and winter seal hunting along the shore and on the sea ice. Bears break into hunting cabins (occasionally with sleeping families inside) attracted by the smell of food. Hunters have been attacked in their tents and there have been some close shaves, but it is many years since a human was badly injured by a polar bear in Arviat.

My hunting companions have often put me on bear patrol while they butcher beluga whales, scan the sea for seals or clean fishing nets. It is my job to look out for bears, or to watch the movements of bears already present, and alert my friends if a hasty retreat is called for. The bears we encounter are usually curious rather than aggressive, standing up to sniff the air, and waiting patiently for their turn with the carcass. But vigilance is critical as curiosity can quickly turn to aggression and, over certain terrain, a polar bear can easily outrun the all-terrain vehicles Arviarmiut use in summer and autumn.

Polar bears: Key facts

Image copyright AFP

Polar bears are the biggest land-based carnivores in the world and live in the Arctic

They mainly eat seals, which they detect using their remarkable sense of smell - bears can smell a seal in the water beneath a metre of compacted snow, and on land from almost 1km (0.6 miles) away

Climate change is currently the single greatest threat to polar bears - their icy habitat is melting away

Source: WWF

Over the past decade, however, encounters have been on the increase. Camping south of the community in summer is no longer safe, and autumn berry picking - an important subsistence activity usually undertaken by women and children - is now fraught with danger. Bears increasingly wander the streets of Arviat, particularly in late autumn.

At this time of year, regular announcements of bear sightings are made on local community FM radio, schools are sometimes closed early and the usually lively streets are eerily quiet. Halloween trick-or-treating, once so wild and fun-filled, has been all but wiped out, for fear of unwanted encounters not with ghosts or demons but with wandering bears.

What is driving this change in the polar bears' behaviour?

Many Arviarmiut blame polar bear tourism in neighbouring Churchill - 250km to the south - for encouraging the animals to look for food in human settlements.

But there are other theories. Some Inuit think the bear population in the region is growing. Many scientists, on the other hand, put the blame on habitat loss - according to this theory it's the desperation of hungry bears facing decreased ice seasons in a rapidly warming Arctic that leads them to approach the town. They have always gathered on the coastline at this time of year, awaiting the formation of the sea ice that is their winter hunting ground, but usually at a greater distance.

Whatever the cause, Arviarmiut have had to get used to sharing their community with growing numbers of large, dangerous and unpredictable carnivores. Many towns in the northern Canadian territory of Nunavut are in the same position - Clyde River, Hall Beach and Resolute Bay have all reported problems in the past couple of years.

In Arviat, things reached a critical point four years ago.

Between 2010 and 2011, 11 polar bears were killed by Arviarmiut defending life or property. So, in 2011, with financial support from WWF (Canada), local hunter Leo Ikakhik was hired as a full-time polar bear monitor. Leo patrols the town, responds to sightings, and discourages polar bears through the use of spotlights and bangers. In addition, many homes have been provided with sealed steel bins for storing frozen meat, which was previously stored on roofs in sub-zero temperatures, and electric fences have been erected around sled dog teams. As a result of these measures, defence kills have all but ceased.

But a number of bears are also killed each year by hunters.

Image copyright Nadine Lamoureux

Under the 1973 International Agreement for the Conservation of Polar Bears and their Habitat, hunting quotas were introduced in communities across the Canadian Arctic. Each Inuit community can now hunt a certain number of bears each year.

Prior to this, between six and 12 bears were killed by Arviarmiut each year. Under the quota system, this figure rose to 15 bears per year through the 1980s, 20 in the 1990s, and peaked at 22 bears per year in 2005. For reasons that are as much to do with politics as conservation, since 2005 the quota has rapidly declined - down to three in 2009 and eight in 2014. This has coincided with the increased numbers of bears in the vicinity of the town and many Arviarmiut argue that the protection of bears seems to be taking precedence over the protection of Inuit children.

The quota is distributed by lottery, and the recipients have a 48-hour window in which to conduct a bear hunt. If anyone fails in his or her attempt, then the next person on the list gets a chance, and another 48-hour hunting window. The system carries on until the quota is filled. But while bear hunting carries great honour, and the families of successful hunters throw feasts in order to share the meat widely with the community, there are those who find the quota system disrespectful to bears.

Respect for animals lies at the heart of Inuit hunting culture. Animals such as caribou, beluga whales, and ringed and bearded seals "give themselves" to hunters who prove their generosity by widely sharing meat and skins, and who prove their humility by not bragging or gloating about their hunting prowess. But the quota system, the 48-hour window of opportunity and the scramble to hunt a bear all run counter to the respect that many Inuit believe polar bears deserve and that all other animals (none of which are subjected to a similar quota system) are accorded in the hunt.

Image copyright Nadine Lamoureux

Taking a cue from some other communities, in the mid-1990s a small portion of the Arviat quota was diverted to trophy hunting. For 12 years, wealthy Americans (and a few from other countries) came to the town each November to hunt. They paid eye-watering amounts of money for the opportunity to add a polar bear to their trophy rooms back in Texas, Michigan, California, and elsewhere. Local hunters worked as guides, tracking bears for these wealthy visitors and taking care of them during their time in the Arctic.

The relatively large sums of money earned during 10 days of guiding proved a godsend to many families. Invariably, it was reinvested into snowmobiles, rifles, boats and outboard motors and the other expensive equipment necessary to hunt the caribou, seals and beluga whales on which Inuit rely for food. This limited trophy hunt benefited vast extended families.

But in 2008, polar bear trophy hunting came to an abrupt end when the US listed polar bears as "threatened" under its Endangered Species Act. This meant that US hunters could no longer take their trophies home from Canada. Having relied on that November income for more than a decade, many Arviarmiut were at a loss.

It was then that some branched out into ecotourism, organising sight-seeing tours, and often hiring the same experienced hunters who had previously guided trophy hunters. These men now help visitors shoot polar bears with cameras rather than rifles. Eco-tourists do not bring in as much revenue as the deep-pocketed trophy hunters, but there are more of them, and they provide employment for a greater part of the year.

Despite the dangers posed to humans, Arviarmiut are seeking ways to live with rather than against polar bears. They are adapting their behaviour to the changing behaviour of the bears - which gives hope that large white bellyflopping animals may remain one of the sights of Arviat for many years to come.

Martina Tyrrell is an environmental anthropologist, writer and sailor. She writes, among other things, about her encounters with marine wildlife on her blog Carina Of Devon.

After many years photographing people and wildlife in Nunavut, Nadine Lamoureux and Lynne Rollin (Barnyard Studio) are now based near Ottawa.

More from the Magazine

Until the 1970s, it was impossible to travel around Canada's Yellowknife region in the winter if you weren't travelling by dogsled. Even though transport options have increased, sled dogs are still prized and prominent in this Arctic region.

Media playback is unsupported on your device Media caption BBC Pop Up visited some sled dogs in Canada's Arctic Yellowknife region

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.