Illustration by Vidhya Nagarajan.

The goldfish were the first to vanish. Every so often, a few would go missing overnight from the office’s tiny outdoor pond. But goldfish were cheap, so no one in the building—an environmental nonprofit in the bustling, sweaty center of Colombo, Sri Lanka—bothered investigating.

Then the dragon koi began to disappear. Lustrous and ethereal, each of these whiskered Japanese carp cost around 10,000 Sri Lankan rupees, or $65. In a fit of extravagance, the building’s landlord had bought 10. Soon, he had seven. Then three.

Panicked, the landlord installed four security cameras to catch the thief. The pond rested at the end of a narrow driveway surrounded by tall concrete walls, so whoever was swiping the carp had either a key or the superhuman ability to bound up nearby roofs and drop in undetected. The landlord couldn’t imagine what kind of person would steal a fish, but he was eager to find out.

A couple of days after the cameras went up, Anya Ratnayaka woke to a string of text messages bursting with exclamation points. Ratnayaka, an obsessive young conservationist, worked a desk job at the nonprofit at the time. She’d paid little attention to the mystery of the dwindling koi. But when she unlocked her phone and saw a grainy security-camera image of the thief, she realized her life was about to change.

The thief was a cat. A big cat. Not a lithe house cat on the prowl, nor a bony feral cat scavenging for scraps. It looked like a miniature leopard—or a domestic cat that had gotten serious about boxing. The creature had black spots, compact ears, and burly shoulders. Under the cover of night, it had slunk along the ledges of the office complex, slipped under an awning, and descended on the pond. In the photo, it crouched at the water’s edge, patiently waiting to pounce on a $65 midnight snack.

Ratnayaka immediately recognized the animal: a fishing cat. Unlike almost every other species in the feline family, fishing cats love water. They live in swamps—specifically, the reedy wetlands that dot Asian nations from India to Malaysia. And they swim. With partially webbed feet and short, rudder-like tails, they coast along the waterways of their riparian homes, making grumbly chirps that sound like duck quacks. True to their name, they dive like Olympians from riverbanks to snag unsuspecting fish.

Ratnayaka is one of the world’s few fishing-cat experts. While studying the cats that roam the wetlands around Colombo, she had occasionally heard rumors of sightings within the city itself. But no one had ever documented a fishing cat in the remote metropolis—or, for that matter, in any city on the planet—until the spring of 2015, when the koi thief was recorded outside her office. Now, on her phone, Ratnayaka held the first evidence that something could be calling—or forcing—the reclusive animals into the heart of one of Asia’s most rapidly developing urban landscapes.

Since then, Ratnayaka has launched the first-ever study of urban fishing cats, identifying and tracking a small, scattered population of the animals in Colombo as they caper over roofs and wiggle through storm drains. As Ratnayaka considers how they may be adapting to this unlikely setting—and whether they’re doing so fast enough to make the city, which has been bulldozing its way into their natural habitat, a sustainable home—she has stumbled into a provocative theory. Some scientists speculate that only the most intelligent members of a species can survive in a hazardous and ever-changing urban world. If so, cities may be making animals smarter than their rural counterparts.

What city life does to fishing cats’ brains is one of many factors that will determine the fate of Ratnayaka’s unwitting urban pioneers. But untangling its influence requires wildlife researchers to confront one of the most daunting questions in cognitive science: What is the definition of intelligence?

***

Colombo is in the midst of an expansion that’s startling even by South Asian standards. Stretched along the shores of the Indian Ocean, the city has been an international-trading center since the days of the Silk Road. But Sri Lanka’s modern economy was crippled by a brutal civil war that lasted from the early 1980s to the late 2000s. Colombo has sprinted to recover prosperity since. Flush with new businesses and tropics-hungry tourists, its Western-style north end is now crowded with glittering skyscrapers, immaculate coffee shops, and thumping nightclubs. The city’s grittier borders, meanwhile, have pressed ever deeper into the surrounding jungle.

On a simmering morning in February, Ratnayaka took me on a tour of the district inhabited by her former office’s mischievous koi-hunting cat. She picked me up in the back of a motorized rickshaw, and we honked our way north through the jammed streets. Buddha statues with flashing halos studded the intersections; everything smelled like incense, garbage, or gasoline.

Photo by Sebastian Kennerknecht / Urban Fishing Cat Conservation Project.

As we rattled along, Ratnayaka—a purple-haired 29-year-old who once stored fishing-cat poop in a Nutella jar in her family’s freezer—gleefully pointed out the unlikely hangouts of the furry thief, a young male cat she’d named Mizuchi after a mythical Japanese dragon that lives in water. Mizuchi’s GPS-collar data had placed him not only in local ponds and canals, but also in the parking lot of a neon-lit movie theater and in the middle of a multilane traffic circle. His territory, which stretched about two square miles, was mostly covered with asphalt and packed with cars.

After a couple of short turns onto leafy side roads, our rickshaw abruptly arrived at a more languid cul-de-sac. Swaying palms shaded the street’s sun-bleached buildings, several of which had ponds and gardens. One of the buildings was Ratnayaka’s old workplace. With a furtive glance, she led me around the corner of an unoccupied house. We passed a line of parked motorcycles and ducked under a balcony, stopping at a small window that opened into an empty, dusty room. Dirt smudges ran up the wall beneath the window. It took me a moment to realize they were paw prints. The derelict room, Ratnayaka said, was Mizuchi’s favorite hideout.

In the middle of Colombo’s mayhem, Ratnayaka’s cats have woven sneaky passages and dark hideaways into a network, within the human world, that remains largely invisible to us. At night, Ratnayaka told me, Mizuchi would skulk along the neighborhood’s high walls and dart through patches of greenery to the low bank of a nearby canal. From there, he could scamper to the cinema, then sneak back home to fish from the ponds before morning. “The collar data showed a very comfortable cat,” Ratnayaka said. “He knew what he was doing. He had a set path; he never veered out of it.”

For now, at least, this covert strategy seems to be working. Ratnayaka has already identified 10 other fishing cats throughout Colombo. Some—possibly Mizuchi’s direct relatives—roam its chaotic precincts. Others stick to wetland parks throughout the city. In both settings, the cats move confidently along established routes, and Ratnayaka feels certain that many were born within Colombo itself. The city’s unique design may have provided the foothold, she says: Colombo has an arterial system of spacious canals, and Mizuchi and his urban cousins have turned them into feline highways.

Ratnayaka and I ended our tour on an old bridge that arched over one of the canals. We shaded our eyes with our hands and looked out over the green water as a portly man in a motorboat slowly chopped through. The canal had an elevated grassy towpath that was partially hidden by flowers and trees, and it was easy to imagine fishing cats bounding along it. In fact, the owner of a nearby music school had already spotted one cat swiping fish from his property’s pond.

Still, most Colombo residents have never seen a fishing cat in the city—if they even know what one is. On the bridge, Ratnayaka and I asked two daytime traffic guards about the cats, and they waved us away. “You don’t get fishing cats in Colombo,” one reassured us.

Photo by Paul Bisceglio / The Atlantic.

Later that night , I spent 10 minutes trying to explain fishing cats to my Airbnb’s genial owner, Chandana Pathirage. It wasn’t until I Googled pictures on my phone and told him the cats sometimes munch on people’s chickens and house kittens that his eyes lit up. “Yes, I have heard stories!” Pathirage said. “People say they come from the outside. They come at night. They kill baby cats, eat squirrels, small birds, rats. They take fish from the ponds.”

People call them hora pusa, he told me. “Thief cat.”

***

By 2030, it’s estimated that nearly 10 percent of the planet’s land will be covered by cities. More than half the human population now lives in urban areas, and an untold number of animals do, too—from mosquitoes that have buzzed around the London Underground for so long they’ve become genetically distinct , to leopards that stalk stray dogs around villages in Mumbai. Colombo is at the forefront of this global trend. Its trees are filled with resplendent magpies and lorikeets, all chirping like arcade machines. Geckos climb its walls, and thick-bellied monitor lizards scurry around its bushes. One evening, I saw a crocodile as long as a canoe casually paddling in one of its lakes.

Sometimes animals end up in cities because they have nowhere else to go. Other times they happily move in, finding readily available food or other advantages over life in the wild. Chicago’s coyotes, for instance, escape year-round hunting and trapping by staying within the city’s borders. “The city actually serves as a huge refuge for them,” says Stan Gehrt, a wildlife ecologist at Ohio State University who has been studying the canines for almost two decades. “There are a lot of nooks and crannies in the landscape, places that people don’t use, that coyotes are really good at exploiting.”

One of the great mysteries of urban adaptation is what, if anything, living in cities does to animal minds. Research on urban wildlife has already shown that cities can have jaw-dropping effects on animals’ behavior. Gehrt’s coyotes have not only learned where it’s safest to cross roads, but have also learned to avoid traffic based on its speed and volume. Do behavioral shifts like this reflect deeper changes in how urban animals think? In what urban animals are?

These questions vex the small subset of wildlife ecologists that is wading into the murky waters of urban-animal intelligence. In several metropolitan areas, researchers have devised simple puzzles—usually difficult-to-open boxes of food—in order to compare the problem-solving abilities of city-dwelling creatures with those of their wild relatives. The results have been tantalizing: Urban animals as varied as Canadian raccoons and Barbadian bullfinches can outperform their rural counterparts. While it pays to be cunning in almost any setting, some scientists propose that foreign, volatile environments like cities demand an especially broad range of cognitive abilities. Eventually, the thinking goes, cities may bend evolution enough to make whole populations of animals within them smarter—if, of course, the animals can survive city life in the first place.

Photo by Paul Bisceglio / The Atlantic.

This is a controversial theory. Even researchers who back it are quick to warn that intelligence is complicated. No one is suggesting that new situations are the only driver of animal smarts: The ways animals interact, how they learn from one another, and the nature of their physical surroundings are all thought to influence how individual animals behave and how their brains take shape over generations, no matter where they live.

And what is intelligence, anyway? Any attempt to test the notion that cities make animals smarter brings researchers into a debate that has raged within psychology for more than a century. There’s no universally accepted way to measure how smart someone is. Human intelligence is slippery and multifaceted, and its origins are vague. Defining intelligence in other species is even harder.

“One of the big challenges in our field is thinking about how to even ask the questions that we’re trying to answer,” says Sarah Benson-Amram, a behavioral ecologist at the University of Wyoming who studies raccoon intelligence. “We don’t speak the same language, we don’t know exactly how each animal perceives the world. How do you pose a fair intelligence test to a variety of species, or even one species in particular?”

But studying animals in new environments may help scientists develop a definition of intelligence that applies across species. Along with others in her field, Benson-Amram has zeroed in on flexibility, long considered an essential criterion for intelligence. “When the environment is changing, you’re able to change your behavioral response, and you don’t perseverate on old responses that used to work but no longer do,” Benson-Amram says. This way of defining intelligence—which researchers also call “behavioral plasticity”—is notably distinct from what could be considered an animal’s specific intelligence. A scrub jay that hides away thousands of seeds and remembers the location of each one certainly has a particular kind of acuity, Benson-Amram notes. But an animal needs a diverse, general set of mental skills—perceptiveness, resourcefulness, foresight, and so on—to tackle the foreign obstacles of cities, she posits.

Whether Colombo’s fishing cats are more flexible than their cousins outside the city is a question Ratnayaka is pursuing as she gathers data on the group’s diet, sleep habits, territory, and other behaviors. If Colombo is making fishing cats smarter, though, there could be a grim twist: The animals most likely to thrive in cities may also be the first to die.

***

The first fishing cat I encountered in Sri Lanka was frozen like a popsicle. I met it by chance; late one afternoon, I hiked to the wetlands at the city’s border and stumbled upon a wildlife-rehabilitation center. Enticed by a muddied sign for the complex and some monkeys dancing through the trees, I followed a wooded path to a clearing of large cages full of injured animals from Colombo and its surroundings: a one-legged eagle, a sickly wild boar, a bandaged porcupine. A fresh-faced attendant named Vibushana Bandara told me that the facility was closed to the public, but graciously offered to show me around instead of calling the police.

After teaching me to hand small bananas to several endangered purple-faced leaf monkeys—a species decimated by Colombo’s rapid urbanization—Bandara brought me to an industrial chest freezer outside a rickety office, opening it to show me a stack of dead animals preserved for future study. He dug a hand into the ice and pulled out a fishing cat. Solid as a rock, the spotted creature was locked into a folded position with its four paws together. When Bandara lifted it upright by a leg to unravel a protective cloth, its whole body held rigid in the air.

The cat, a small female, had recently been hit by a car just outside the city. The rehabilitation center receives one or two fishing cats a month, Bandara explained, and most are already dead. Cars and motorcycles are often the culprits. Bandara plunked the cat down before us on the grass. Frost speckled her paws and snout. Some blood was frozen around her mouth, and a deep wound on one of her thighs had turned blue during the freezing process.

Photo by Paul Bisceglio / The Atlantic.

Some conservationists in Colombo speculate that Sri Lanka’s civil war actually protected fishing cats near the city. Though the violence dealt a major blow to wildlife in the country’s northern regions, where fighting was heavy and sustained, the sporadic bombings and other outbursts of violence in Colombo stunted the city’s growth while leaving the wetlands—and all their wild inhabitants—undisturbed for decades. Now, as Colombo expands, the animals that are adapting to the city also have to deal with its greatest peril: us.

In a recent paper in the journal Animal Behavior, Benson-Amram and two co-authors propose that this situation is especially—and paradoxically—problematic for the animals best able to take advantage of the resources and opportunities that cities offer. Yes, the perpetual puzzle of city living could select for traits that are hallmarks of intelligence, like innovation, learning, memory, boldness, and curiosity, the researchers write. But those traits can also drive a raccoon to break into your trash can, a mountain lion to smash your window and land on you while you’re sleeping , or a fishing cat to nab a fuzzy house kitten outside a hut door.

Encounters like these are often as bad for the intruding animals as they are for the humans involved. In Sri Lanka, cars—which have killed more than 100 fishing cats in the past three years—are far from the only threat to the felines. In villages north of Colombo, people have been known to pour boiling water in the eyes of fishing cats that get trapped in coops while attempting to steal chickens. Throughout the country, the cats are sometimes chased and killed because they’re confused with leopards, which Sri Lankans tend to revere at a distance but fear if they’re close enough to pounce. (Unlike leopards, fishing cats have no record of ever attacking a person.)

Ratnayaka imagines that life for a Colombo fishing cat is, for the most part, terrifying. Crossing the city’s roads is scary enough for humans, she says. “Then you’ve got all these houses with dogs. And people use rat poison to kill rats, and then the cats go and eat the rats, so there’s a risk of dying there.”

Given a choice, Ratnayaka suspects fishing cats would opt for the jungle over the city any day. Even when they benefit from the urban environment, Colombo’s dangers have a way of catching up to them. Back when Ratnayaka first learned about Mizuchi, she kept replenishing the fish in her office’s pond so that he would return each night and she could observe more of his behavior. The bait worked like a charm—until the night he stopped showing up. Soon, she got a call from the city’s wildlife department: Someone had found an angry fishing cat stuck in a storm drain. He might have gotten so fat that he could no longer squeeze himself out.

***

Toward the end of my stay in Sri Lanka, I began to worry that I was wasting my time chasing after the idea of intelligence. There’s so much uncertainty, so many variables. If the fishing cats were showing me something, perhaps it was simply that generalizations about how urban environments affect animals’ brains are too broad to mean much at all.

Photo by Paul Bisceglio / The Atlantic.

I hoped that seeing the cats for myself in Sri Lanka—alive, not frozen—would show me what theories couldn’t. So one morning, I forced myself out of bed to catch a 5 a.m. train to Anuradhapura, an ancient city 125 miles north of Colombo. My destination was an active military base that operates, of all things, a small zoo for disabled animals.

Ratnayaka and her colleagues had reassured me that this zoo, which is free and open to the public, is a rare boon for conservation in Sri Lanka. But many of its animals were unkempt and neurotic. When I arrived, I was greeted by a petulant turkey that puffed at visitors and a lone monkey that paced back and forth in a cage full of ducks. Two free-standing, fenced-in enclosures were supposed to house rescued fishing cats, but no cats were in sight. Nervous about this whole situation, I circled around one and peered through a rusted grate into a dark den. Then my nose caught an extraordinary odor of oil, onions, and musk—the room-clearing smell of a fishing cat. In the blackness of the den, a pair of steady, pale eyes gleamed.

This cat, I learned, was silently guarding a litter of three-week-old kittens. None of them would emerge during the daytime, so a burly zookeeper led me over to the second enclosure. Before I realized what he was doing, the keeper unlocked a door to the enclosure, walked over to a wooden shelter, and unceremoniously slammed his fist on the roof. Out launched another fishing cat, hissing like mad. It bounded over a low-slung tree branch and snaked along the perimeter, scanning for whatever had scared it.

Photo by Paul Bisceglio / The Atlantic.

Here was the creature I had spent the week tracking through wetlands, traffic, and quiet alleys. The cat, a male, was considerably beefier than the frozen female I’d seen, thanks in part to a generous zoo diet. His fur was a cool shade of gray, and he had a raw, pink wound—likely the result of compulsive scratching—beneath his right ear. We locked eyes and he greeted me with bared teeth, as if to make it clear that my enthusiasm wasn’t mutual.

The keeper exited the enclosure and pointed to a tree within it. I realized that a third fishing cat had been hiding among the branches. This one had cloudy eyes, probably blinded by a hot-water attack in the nearby jungle.

The keeper then wandered away and left me alone with the irritated animals. If they had secrets to share, now was my time to receive them. I sat on the grass outside the fence, notebook open, ready for some profound sign of what was going on beneath the cats’ broad foreheads. But as I should have expected, they simply acted like cats. The beefy cat plopped down near the wooden shelter, eyeing me warily as I scooted toward him. He soon fell asleep, occasionally stirring awake to lick his limbs and bite at his nails. His ears perked whenever the park’s colorful birds swooped nearby.

As the three of us lazed in the heavy afternoon heat, I mulled over the mystery of animal cognition—how creatures close enough to touch remain so far outside our understanding. But some animal researchers believe they can, in fact, nail intelligence down. Kay Holekamp, a veteran zoologist at Michigan State University, is one of several scientists who have proposed to quantify animal intelligence with personality tests. Since intelligence already tends to be defined in terms of behavioral characteristics—boldness, curiosity, persistence, and so forth—Holekamp reasons that researchers should be able to comprehensively examine all the known traits tied to intelligence, then algorithmically combine the results into a single overall score: g, for general intelligence.

Building on her colleagues’ popular puzzle-box experiments, Holekamp has started piloting this idea by posing six challenges to rural, urban, and suburban populations of hyenas in Kenya. The challenges involve devices like giant metal bins with changing access points to food, and multicolored buckets that test pattern recognition. By measuring individual hyenas’ performances, Holekamp is collecting hard numbers on which animals are the quickest learners, the fastest to adjust to new situations, and the best at controlling their impulses. Eventually, she wants to see if the hyenas’ different habitats influence the “g” scores they achieve.

Like so much work in the field of animal intelligence, the effectiveness of this “psychometric factor-analytical approach,” as Holekamp calls it, remains to be determined. She envisions that an exhaustive series of tests could one day give scientists a mathematical basis for animal intelligence, both within and across species. What such measurements truly mean will be as debatable—and potentially as ethically fraught —as the results of personality and intelligence tests for humans. Moreover, whatever gamut of tests would be equally valid for a hyena and, say, a hummingbird is anyone’s guess.

Still, Holekamp argues the approach is the most sensible way to unknot all the possible effects cities could have on animals’ brains—and, more fundamentally, to bridge the as-yet-impassable gap between humans and the creatures among us.

She also throws in a curveball. “If we can begin to understand what the forces are that shaped the evolution of general intelligence in animals, there’s no reason that you can’t build those forces into the environment experienced by digital organisms and evolve intelligence in that way,” she says. She means artificial intelligence: Figuring out how animal smarts evolve, she believes, could teach us how to manufacture intelligence for ourselves.

***

For Ratnayaka, any inquiry into animals’ intelligence is strictly a pragmatic step toward protecting them. She’s darkly pessimistic about the future of fishing cats in her unrelentingly modernizing city, whether the cats are getting smarter. “When you look at it short-term, it can seem like a city is helping,” she says. “But long-term, unless everything is done sustainably, I don’t think the species will survive.”

Once she has consolidated her data from tracking collars and motion-sensor-camera traps, Ratnayaka will compare her enigmatic urbanites to a group of their jungle-dwelling cousins studied by one of her colleagues, Ashan Thudugala. Trading notes on the cats’ behavior, the two researchers will look at how Colombo may be changing Ratnayaka’s cats, then use those insights to recommend ways to conserve the city’s wetlands and make its crowded neighborhoods more hospitable to cats and other wildlife. “The things I’m suggesting don’t mean that you have to clear a bunch of buildings and make sure people don’t go into the wetlands,” Ratnayaka says. “I’m saying very simple things, like grow some plants on the sidewalk, grow some trees on the pavement so that birds can come and sit.”

Jim Sanderson, a small-cat expert and a mentor to Ratnayaka, envisions one day achieving a publicity campaign for Colombo’s fishing cats on the scale of the effort to protect the Iriomote cat in Japan. Endemic to a remote but urbanizing island, this endangered cat has benefited in recent years from a government-backed push to construct road underpasses, paste pictures of the cat on the sides of buses, and even trim bushes to look like the rare creature. “There’s no initiative yet that says, ‘Okay, we’re going to build a landscape that accommodates fishing cats,’” Sanderson says. “So far, it’s the other way: ‘Well, we need storm drains,’ then the cats take advantage of them. But we can create these idyllic landscapes for both animals and humans if we just do a little bit.”

On my last day in Colombo, Ratnayaka, Sanderson, Thudugala, and several volunteers put on a public fishing-cat expo. It was a delightfully dorky event: a short march around a lake, with learning-station stopovers, followed by a series of lectures on small cats in Sri Lanka. The lectures were held in a spacious hut in the middle of one of the city’s wetland parks, and attendees—mostly affluent, well-educated members of Colombo’s small but growing conservation community—sat among the scattered island thickets where some of the city’s fishing cats live. Unsurprisingly, the cats were nowhere to be seen. They were present but invisible, hidden somewhere in the tall grass and flowered branches.

As the sun began to set, I strolled along the residential streets that border the park’s perimeter, wondering if I could spot a cat out for an early dinner. I made my way to the dead end of an alley, where, suddenly, a motion caught my eye and a creature tumbled out of a nearby shrub. My heart jumped—but it wasn’t a fishing cat. I’d cornered one of the city’s ubiquitous monitor lizards. Stuck between me and a closed driveway gate, the bow-legged reptile scurried back and forth, then flopped up against the barrier, flaccidly sliding back down. I stepped aside and let it sprint back into the greenery.

The most reliable measurement of an animal’s intelligence may turn out to be how good it is at staying out of our way. Half a year after Ratnayaka began tracking Mizuchi, his GPS collar broke, likely caught in a drain or ruined by swimming. He continued to pop up in photos from camera traps for a month or two, but then went missing entirely. Ratnayaka hasn’t seen him in two years. It’s very possible he’s dead. But Ratnayaka believes someone would have reported a body if so, given all the busy places Mizuchi was known to wander. Maybe he got tired of city life, and cruised down Colombo’s canals to the riparian world of his forebears. More likely, he still roams the streets—a craftier thief than ever, diving into koi ponds and quacking triumphantly into the night.

Paul Bisceglio is an associate editor at The Atlantic.

This article is part of The Atlantic’s Life Up Close project, which is supported by the HHMI Department of Science Education.