In the summer of 2015 a single dead lion, Cecil, dominated the news. Trophy hunting is not without its complications, but Panthera leo faces even larger problems than wealthy hunters with big guns. Classified as threatened, lions suffer from habitat loss, depletion of prey, retaliatory killing for real or perceived losses of human life and livestock, poaching for traditional medicine, and more. In Africa these big cats have been relegated to just 17 percent of their historical range, and just one population survives elsewhere, isolated in India. New research reveals that although the state of African lions seems dire, in some places the cats are actually thriving. But these success stories aren't as straightforward as they first appear, and the future well-being of lions in Africa won't come cheap.

Although the king of the jungle is fairly well studied, most research efforts have focused on individual populations rather than the entire species, which is down to perhaps as few as 20,000 individuals. By combining data from them, researchers can now take continent-wide views of the state of Africa's most iconic predator. In the latest study of this kind, a group of researchers led by University of Oxford zoologist Hans Bauer compiled data from surveys of 47 lion populations conducted over the past 20 years. They found that each of the nine lion populations in West Africa, save for one, is in decline (and two populations in that area might already be locally extinct). Lions in East Africa also are faring poorly; the Serengeti population is the only large group there for which the predictions skew positively. According to the conservative analysis, there is a 67 percent chance that the West African lion population will be halved 20 years from now, whereas the odds for the East African cats are around 37 percent.

The analysis also revealed a glimmer of hope: most of the lions in southern Africa are thriving. On this part of the continent, “lion populations are very likely to persist,” says University of Minnesota lion expert Craig Packer, who oversaw the study, which was recently published in the Proceedings of the National Academy of Sciences USA. Why? Either they live in deserts so remote and inhospitable that humans pose little threat, or they live in fenced-in parks and reserves.

Even small fenced reserves have conservation value, according to Peter A. Lindsey, a researcher at the conservation organization Panthera who was not involved in the study. “Any land we can get under protection can contribute to conservation. So the more, the better,” he says. Fences allow lions and other wildlife to survive on fragments of land on which it would otherwise be impossible to conserve large mammals because they keep big animals from coming into conflict with humans, livestock and agriculture. In many places the only reason conservancies can work to restore populations at all is because local communities have been reassured that these barriers will keep them safe.

Not all biologists see fences as the saving grace of lions, however. Enclosed lions make only “limited contributions to ecosystem functionality,” Bauer and his colleagues wrote in their study. Does fencing turn a landscape into little more than a glorified zoo, lions into a pricey tourist attraction?

If a fenced area is large—South Africa's mostly fenced Kruger National Park is nearly the size of New Jersey—then the lions still can perform their roles as apex predators and regulate the ecosystem by controlling populations of antelope, buffalo and other ungulates, which in turn help to maintain plant communities. Despite the artificially imposed boundaries, “nobody doubts that Kruger is a real ecosystem, with real ecosystem processes in it,” Packer says.

But most fenced areas are quite a bit smaller. “If you contain wildlife in small, fenced, protected areas, you have to manage it quite intensively because the population dynamics seem to go a bit crazy,” Lindsey says. “And the reasons for this are not particularly well understood.” Intensive management can include implanting females with hormonal contraceptives to prevent overpopulation, as well as capturing and moving individuals to other reserves to bolster genetic diversity. If new genes are not regularly introduced into a small group of lions, they run the risk of inbreeding, which can cause a population to collapse.

This involvement helps, but it is not a cure-all. “The lion community as a whole needs to realistically come to grips with our priorities and the priorities of [local] communities,” says Institute of Zoology researcher Andrew Jacobson. A fence would be impractical, for example, in places where it would impede wildlife migrations, such as the wildebeest that chase the rains across the Serengeti every year.

No matter which side of the fence they fall on, most lion researchers agree that the future of lions in Africa hinges more on dollars than fences. Many African parks and reserves struggle because they are chronically underfunded. According to a 2013 analysis conducted by Packer, it is cheaper to manage lions in fenced reserves at around $500 per square kilometer (not counting the high cost of installing the fence in the first place) than in unfenced areas, where $2,000 is only sufficient for managing a population at half its potential density. But an analysis by Montana State University researcher Scott Creel found that, dollar for dollar, spending on unfenced areas helps more individual lions.

Indeed, if land managers in Africa were as well funded as Yellowstone National Park, at around $4,100 per square kilometer, they could afford to manage the average unfenced lion population at around two-thirds its potential size, a step up from the current status quo. Despite the utility of ecotourism and trophy hunting for lion conservation in general, only a small proportion of that revenue typically becomes available to wildlife managers.

In places where ecology renders fences impractical, funding is critical for providing an economic incentive for locals to tolerate the costs of coexisting with large carnivores, such as losing livestock to hungry lions or keeping their flocks from grazing on protected land. Indeed, if lions' wild prey is edged out by the grazing livestock of a swelling African population, they will have no choice but to develop a taste for beef. That, in turn, could provoke more retaliatory killings, and lions will feel the squeeze from each side as they suffer both from direct conflict with humans and from having less to eat. Some ecosystems will benefit from fences, whereas other populations will require conflict-mitigation projects, but all such efforts will require a lot more money.

So the latest insights do offer a path forward: lions can still have a home in Africa well into the future so long as the international community is willing to finance it. “If the level of funding for Africa's protected areas can be increased,” Lindsey says, “there's no reason why the existing protected areas couldn't carry a lot more lions.”