Most Toronto residents have a raccoon story. They steal doughnuts. They ride the subway. They show up at baseball games and airport baggage carousels. They break into banks.

And, in Canada’s biggest city, they’re getting more brazen.

“Raccoons are just like people. Some are calm. Some are curious,” said Derick McChesney, owner of a Toronto-based wildlife control company. “And some are just vicious assholes.”

One recent night, Jenny Serwylo awoke to the sound of rustling in her kitchen. Turning on the lights, she found three raccoons helping themselves to bread. Two scurried off, but one refused to budge, holding eye contact with her as it ate.

“He wasn’t very polite, but he wasn’t aggressive. He was just a guy, looking for food. He was going to eat, no matter what,” she said. Each time she poked a broom handle at the raccoon, it would grab it with its paws and yank.

The stalemate continued until the raccoon had had finished, said Serwylo. Then, “he yawned, scratched his belly and just decided to walk out the window”.

The break-in – and the subsequent social media flurry it unleashed – underscored the extent to which the tenacious bandits have become enmeshed in the city’s culture.

The mayor has pledged to defeat them. Numerous businesses have adopted them for their logos. Some Torontonians see them as scrappy heroes, others as villainous thugs.

And over the years, the animals have come to symbolize the growing pains of a rapidly expanding city, where everyone battles for space.

“As Torontonians, we go: ‘Yeah, these are our people,’” said Suzanne MacDonald, a professor of animal behaviour, and the city’s preeminent raccoon researcher. “They’re the animal we love to hate.”

A popular shirt, which once boasted “Toronto v Everybody” – a nod to the city’s desire to punch above its weight – has been supplanted by one that now reads “Raccoons v Toronto”.

For a creature that residents encounter daily, raccoons remain something of a mystery to science. Early naturalists thought they were related to bears. They’re not. Many people believe they have opposable thumbs. They don’t.

And, critically, no one knows how many are scurrying into sheds and attics across Toronto.

A raccoon on a fourth floor ledge of the Toronto Star building. Photograph: Steve Russell/Toronto Star via Getty Images

“There’s this large animal living among us, that was here first, has done super well – and we don’t know anything about them,” said MacDonald.

There is one fact that most residents can confirm with near certainty: “trash pandas” will eat almost anything. Over the years, a diet of grub and berries has slowly morphed into one that is largely reliant on human food – and that has led to an escalating war with humans over the contents of their garbage bins.

“Any resource can be exploited because they have these lovely little hands and they have a lovely little brain that allows them to figure stuff out,” said MacDonald.

In the corner of a Toronto garage one recent morning, a raccoon made a hurried escape from a wildlife control team, squeezing through a 3in square hole.

They’ve bullied their way into the city – and now we’ve just embraced them Derick McChesney

“These guys can get through anything,” said McChesney, the wildlife control expert, as the animal wriggled, contorted and eventually escaped. “As long as their skull can get through, the rest of the body goes too.”

McChesney’s last 15 years have been dedicated to outwitting the beasts. Instead of catching them, he seals off entry points and installed a one-way door which lets the raccoons leave in search of food, but prevents them from returning.

Despite witnessing the destruction they can wreak, he is unequivocal about his feelings: “I love ‘em. They’re such great creatures,” he said. “They’ve bullied their way into the city – and now we’ve just embraced them.”

Not all of the city’s residents share such warm feelings, however: half of respondents in a 2014 poll wanted Toronto’s raccoons euthanized to keep numbers at a minimum.

But the relationship is complicated. The following year, a photo of a dead raccoon on a busy downtown street went viral. Over the next few hours, funerary trappings sprang up around the furry body: a framed photo, candles and a donation box.

The raccoon was given a name (Conrad), a hashtag (#DeadRaccoonTO) and a single rose (red).

@311Toronto It’s now after 3 pm and I guess Animal Services hasn’t been by, because someone’s having some fun now: pic.twitter.com/ff0ybbm5cX — Jason Wagar (@jasonwagar) July 9, 2015

When city workers eventually turned up to clear up the scene, one councillor tweeted (jokingly) that, in honour of the raccoon, Toronto residents should leave the lids of their garbage bins open.

Bins – and the bounty they contain – are a flashpoint in raccoon’s relationship with Toronto’s human relationship.

In 2015, frustration with raccoon’s nocturnal garbage raids culminated in a $31m moonshot effort to engineer the impossible: a raccoon-proof bin.

When the new design (with tougher container and a hand-turned locking mechanism) was unveiled, one Toronto media outlet breathlessly described it as a “marvel of ergonomic design”.

City mayor John Tory, threw his weight behind the scheme, saying: “We are ready, we are armed and we are motivated to show that we cannot be defeated by these critters.

As the bins rolled out across the city, he tweeted: “I love the smell of new raccoon-resistant green bins in the morning.”

I love the smell of new raccoon-resistant green bins in the morning. https://t.co/Ml2CXIHYoX — John Tory (@JohnTory) May 25, 2017

Inevitably, it took just days before raccoons figured out how to open the new bins – by tipping them over and breaking the lock.

“I wasn’t surprised one bit that they solved it,” said McChesney.

City life rewards ingenuity, said MacDonald, who argues that Toronto is witnessing the emergence of a new raccoon – which she calls the “über-raccoon”.

“How do we stop this evolutionary arms race so that we can actually stay ahead of them?” asked MacDonald.

She argues that Toronto only has two options: invent an even better garbage bin, or make peace with its furry inhabitants. “We blame the raccoons for being smart. But we made them that way. It’s really our burden to bear.”