Hanuman langur monkeys in Jodhpur, India. When drought killed off half the rural population, those in the city were unaffected. Photograph: Cyril Ruoso/Mind

Humans are becoming ever more urban in their habits, yet it’s only recently that scientists have attempted to quantify the impact of urbanisation on levels of biodiversity around the world. One striking recent global analysis of bird and plant diversity showed just how dramatically the built environment hits birds. For every species spotted in a given urban environment, there are typically more than 10 in an equivalent area of non-urban habitat.

This might sound like a dismal statistic, but it’s also an opportunity – a valuable benchmark from which we can now improve. “There are many reasons why urban biodiversity matters,” says Mark Goddard, a biologist at the University of Leeds and one of the authors on the recent paper.

For a start, many of the world’s major cities are located in prime locations that are naturally rich in species and still support a significant number. Singapore is the stand-out example, a city in which it’s possible to twitch some 347 native birds, of which 12 are on the IUCN Red List of Threatened Species.

In India, thanks to the reverence that Hindus places on cows, elephants and monkeys, there is room for all these animals in even the busiest of cities. Indeed, when conditions in the countryside get really hostile, the urban environment may be the best place for animals to be.

This was probably the case for Hanuman langur monkeys during a severe drought in Rajasthan in 2000 that caused around half of the non-urban population to die off. In Jodhpur, where the animals had access to plenty of food and water, there was almost no change in the population size.

Among primates, it’s baboons that do best in a human-altered world. One of the best-studied urban populations is in Cape Town, South Africa, where the chacma baboon has been living cheek by jowl with humans since at least the 15th century. In spite of the increasing pressures on the wild spaces around the city, the local baboon population is estimated to have risen from 365 in 1998 to 475 in 2011.

Part of the baboon’s success is their strong social network, their unfussy diet and behavioural adaptability. In urban settings like Cape Town, baboons appear to have honed their raiding skills, zipping into densely populated areas to steal high-value human foodstuffs.

Similarly, the Barbary macaques of Gibraltar, emboldened by their friendly contact with tourists, have been carrying out forays further into human territory, raiding dustbins and running amok. Black bears in Nevada also do well out of garbage, with urban bears far less active yet far heavier than their wild counterparts.

Even carnivores, it seems, can survive the big city, though they are probably benefitting from the abundance of rats and other rodents (which make up almost half their diet) rather than human food. In Chicago, researchers conducting the largest urban study of coyotes in the world have found these animals are more active at night, which brings them into less frequent contact with humans and traffic.

Other species have come up with different solutions to city life. There’s good evidence, for instance, that urban great tits deliver their songs faster and at a higher pitch so they can be heard above the hectic soundscape. In Belo Horizonte in Brazil, black-tufted marmosets have altered their sleeping habits, carefully selecting trees that domestic cats cannot easily climb.

In short, there are still plenty of city-dwelling species to protect. But how can we make our cities more inviting places for these and other creatures – and, to put it bluntly, why should we bother?

Goddard is unequivocal. “If cities are to support a burgeoning human population, the maintenance of functioning urban ecosystems and the plethora of services they provide will be imperative for human health and well-being,” he says.

It is widely acknowledged that cities with some kind of functioning ecosystem make for better places for humans to live. Certainly, less green and more grey can often result in an increase in pollution and flooding. But more plants and animals in cities also make for happier, healthier people.

Few cities have been tangling with urban ecology for as long as Berlin. Slow economic recovery after the second world war meant that reconstruction took a long time. This provided local ecologists with the ideal conditions to develop an ambitious ecological research programme in the bombed-out wastelands of West Berlin, says Jens Lachmund, a sociologist at the University of Maastricht in the Netherlands and the author of Greening Berlin: the Co-production of Science, Politics, and Urban Nature.

The pioneering work in Berlin had several consequences, notably the formation of significant natural spaces within the city, such as the Südgelände Nature Park. “Berlin has indeed benefitted a lot from being a case study in urban ecology,” says Lachmund.

The recent research conducted by Goddard and his colleagues confirms the importance of natural spaces within an urban setting. Essentially, the greener the city, the greater the proportion of native biodiversity that is retained.

“The key message from this work is very simple,” says Goddard. “The protection of existing green spaces and the creation of new habitats is essential for supporting wildlife in cities. How we actually do this is more challenging, and will require collaboration between scientists, urban planners and habitat managers.”

In 2008, the parties to the Convention on Biological Diversity began developing the City Biodiversity Index, a protocol for the evaluation of urban wildlife. Then, in 2012, the CBD launched Cities and Biodiversity Outlook, an effort to provide “a global assessment of the links between urbanisation, biodiversity and ecosystem services”.

Cities take up just 3% of the terrestrial surface area, yet according to the most recent estimate from the United Nations, some 3.6 billion people (just over 50% of the global population) now live in urban areas. By 2050, this figure is projected to have risen to 6.3 billion. Without animals and birds to keep us company, it is a bleak prospect.