Of the millions of eggs laid by the endangered olive ridley sea turtles on one Costa Rican beach, few survive both predators and poachers. But how could allowing local villagers to harvest the eggs be a solution?

Dawn on Costa Rica’s Pacific coast and the dark figure of a man at the water’s edge gradually becomes distinct under a pinkening sky. I switch off my torch. Jairo Quiros Rosales and I are the only people to be seen on this broad black beach, the volcanic sands of which stretch north for several miles. Jairo is beckoning, so I hurry down to him, scanning the beach and murky shoreline. As the light grows, I make out the funereal vultures flecking the distance, and assorted mutts appear from the gloom to sniff the night from the sands.

And then I see them: about 100 metres further up the beach, like strange, regularly humped stones, hundreds of olive ridley sea turtles are making their way from the ocean on to the beach to lay their eggs. This is the arribada. It means “the arrival” in Spanish, and I have been waiting more than a month to see it.

Most marine turtles nest individually at various times during the year so that their young hatch at unpredictable times and places to avoid predators. But olive ridley turtles evolved a mass-nesting strategy. By synchronising their egg-laying, so many hatchlings are produced that the predators cannot consume them all and are overwhelmed. It’s known as “predator swamping”. The mass emergence of olive ridley turtles happens a few times a year in just a few places around the world, and Ostional beach in Costa Rica is one of them.

As we walk along the shore, turtles stream out of the sea like tanks invading the beach – a maternal armada of ancient reptiles driven forward by hormonal compulsion to deposit their precious cargo. Jairo points out to sea where a line of carapaces bob parallel to the shoreline, little heads poking up periodically to breathe, waiting their turn. Ahead of us the beach begins to undulate with heart-shaped olive shells as the turtles crawl over and past each other in their urgency. There are perhaps tens of thousands now crowding the beach. Some, having done their business, are on their way back to the ocean, heaving their heavy shells against the oncoming tide of pregnant comrades on flippers poorly suited to terrestrial marches. Spent, they wait at the shore for incoming waves to sweep them out to sea.

I’m absorbed in the wonder of it all. I’ve seen marine turtles close up, though rarely, while diving, where they move effortlessly and with surprising grace. It is unusual to see large wild animals up close, and to be surrounded by so many is almost incredible.

Olive ridley turtles, like all marine turtles, are threatened with extinction because of us. The natural world is reeling from our global impact, and for turtles, like so many other species, it’s only getting worse. Should we care? What does it really matter if we lose a bunch of animals we hardly even see? Humanity’s relationship with the natural world is a complicated one – to understand our current extinction pattern, we need to look at the way our human lives and livelihoods, as well as our desires and motivations, are enmeshed within the complex global environment.

The story of the arribada offers an insight into a planet-wide problem that is far bigger than any individual players. The details are, of course, different for each animal or plant struggling to survive on a human-dominated planet, but the human emotions and drivers are universal. What makes Ostional beach so extraordinary is that residents have found a way to make use of their natural resource but also to protect it. And that is the key: we cannot protect the world’s wildlife unless we also protect the needs of the humans that rely on it.

Her shell heaves with obvious effort and her eyes stare unresponsively as she enters a trance-like state

As we walk along the beach, Jairo is counting the turtles, estimating numbers between regularly placed ranger posts by noting shells and the curious tank tracks they leave in the sand on their commute up and back. Later, researchers will make a more accurate count, he says, but on first reckoning, there are more than 10,000 turtles so far in the arribada. Some of them will be tagged and measured and logged on an international database so that their movements can be tracked. First, he wants to show me something.

“Venga [Come on]!” he urges, and leads me up the beach to where the damp flatness eases to soft dry dunes. Here, above the tideline, is where the turtles nest. A new arrival has made her way up here and is beginning to dig at her chosen spot. Jairo and I squat down to watch. With her front flippers she spades the sand, flicking it left and right, frequently covering my feet. In just a few minutes the hole is ready for her to gently reverse into, lowering herself tail first.

When the hole is finally to her satisfaction, she readies herself for egg-laying. Here, her labours begin. Her shell heaves with obvious effort and her eyes stare unresponsively as she enters a trance-like state. Beneath her, in the carefully prepared nest that she has judged to be of the right temperature, depth and distance from the ocean, one by one she is depositing her eggs – her evolutionary raison d’être, the genetic material that links her to her mother, grandmother, all the way back to the Cretaceous and, in some fundamental way, to her contemporary distant cousin: me. Her breathing comes strongly and moisture gathers in her nostrils. Across the divide of animal class, from mammal to reptile, I feel great empathy for this mother. Around us, in this vast maternity ward, other mothers are flicking sand or laying eggs. And between them stalk the vultures and dogs, biding their time, waiting to dig up the newly laid eggs.

Each turtle lays around 100 eggs, but of more than 10m eggs laid in an arribada, only around 0.2% typically survive to hatch. And of the hatchlings, just 1% are thought to make it to adulthood. Part of the problem is the arribada itself, which lasts for around five nights. So many turtles laying on a comparatively small stretch of beach means that turtles arriving on subsequent nights dig up and damage the previous night’s eggs, causing bacterial infections to destroy both sets of eggs. And, because the incubation period is at least 45 days, while arribadas usually occur at monthly intervals, a nesting turtle may dig up and ruin eggs from a previous arribada too.

Facebook Twitter Pinterest Photograph: Yuri Cortez/AFP/Getty Images

Vultures are already feasting on the torn remains of scattered eggs. They cannot dig them up from the nests, but dogs can, and wherever there are humans, we bring dogs. The dogs here are a menace to the arriving turtles as well as to their eggs and hatchlings. Jairo shoos them away but they return quickly.

He asks me if I want to see further, and I nod. Carefully, he brushes a bridge of sand away from the tail of our labouring turtle and I peek through. Down in her nest is a clutch of white eggs the size of ping-pong balls. From behind her tail, her fleshy ovipositor hangs down and while I watch, mesmerised, it releases another precious ball, followed by a squirt of clear viscous protective fluid to coat the permeable eggs. We watch a few more eggs drop down and then Jairo replaces the sand seal and we sit back.

Turtles are exquisitely adapted to their environment – they have survived almost unchanged since the Triassic – and they can live for more than a century in the wild, reproducing well into old age. But, in the Anthropocene, this age dominated by humans, they face perhaps their toughest challenge for more than a million years – beaches where they nest have been disturbed by development and the sheer numbers of people and dogs. Artificial light causes problems, confusing turtles and hatchlings, which rely on moonlight to navigate. They can be killed or injured by boat impacts or entangled in fishing nets, and many are dying from ingesting plastic and other pollutants. Over-fishing and the destruction of coral reefs, where turtles graze, is threatening their food supply.

The poachers have turned violent, threatening and attacking, even killing the environmentalists

Climate change, too, is having an impact: rising sea levels and associated beach erosion reduce the area available for nesting – some beaches have become unusable – and warmer temperatures are causing sex changes. The sex of a turtle is dependent on the temperature of the incubating egg. Warmer eggs develop into females, cooler ones into males. Biologists are reporting that global warming is already resulting in an imbalance in the sexes for a number of reptiles, with worrying consequences for mating and the species’s survival. The previous month, unusually, there was no arribada here, and a lack of available males is one of the reasons suspected.

That said, by far the biggest threat to turtles is poaching. Around the world nesting female olive ridleys are slaughtered on the beach for their meat, skins and shells, and their eggs are traded as a valuable delicacy. In the past 20 years, just one generation, the global population has been slashed by a third. The illegal trade in the world’s wildlife is worth more than £12bn a year and threatens the stability of governments as well as human health – some 70% of infectious diseases have zoonotic [communicable from animals to humans] origins. Illegal wildlife trade is often conducted by well organised criminal networks that undermine governments’ efforts to halt other illegal trades, such as arms and drug trafficking, and help finance regional conflicts.

Conservationists like Jairo and a few government rangers patrol this beach during arribadas, but they are little match for determined poachers, who sell their eggs as aphrodisiacs on the black market. On the Caribbean coast of Costa Rica, I’ve seen turtle eggs openly sold and eaten in bars and cafés. The beach of Puerto Moin, on that coast, is used by endangered leatherback turtles and poaching is so rife that young conservationists – many of whom are volunteers – race to nesting sites to dig up the eggs and rebury them in secret, safer locations.

The poachers, many of whom are also involved in drug crime, have turned violent, threatening and attacking the environmentalists. In May 2013 a young conservationist, Jairo Mora, was collecting turtle eggs for reburial when he was kidnapped and murdered by poachers. No one was jailed for his murder, and Mora joins a growing list of environmentalists killed for protecting wildlife in Costa Rica and beyond. In 2015, the most recent year for which records exist, 185 environmentalists were killed protecting natural resources globally. Only a tiny number of such deaths result in convictions.

Facebook Twitter Pinterest Locals gather the sea turtle eggs: the Ostional Development Association allows certain families to harvest a limited number of eggs on the first three mornings of an arribada. Photograph: Mayela Lopez/AFP/Getty Images

Do you worry about your own safety when you’re out here alone at night, I ask Jairo. “No, the Caribbean is different,” he says. And then he admits, “Sometimes.”

It is fully light now, almost 6am. Jairo is tired but smiling. The beach we’ve had all to ourselves is about to be invaded. “Our” turtle has finished laying her eggs – she carefully covers them with sand and lumbers down to the shore, returning to the ocean with the other mothers, each having played their part in the continuation of their species. I feel ridiculously proprietorial about this beautiful place, having watched its sands fill with turtles and witnessed the private efforts of a mother birthing the next generation, as night turned to day. From the village end of the beach, I see a band of about 40 people approaching, carrying large rice sacks and baskets.

For the past few decades, the community here has been trying something unique – a controversial experiment in conservation that aims to maintain a sustainable turtle population while benefiting the impoverished local village. Ostional is the only place in the world where harvesting olive ridley turtle eggs is legal.

All around me, local men and women are dancing a tarantella on the sand, stamping gently in bare feet to find nests

Malena Vega comes over to me, a warm smile creasing her round face. We’ve spoken a couple of times on the phone and she’s kindly offered to include me in the activities today. She looks up at Jairo and he confirms that there were more than 1,000 nesting turtles on the beach, the minimum number required for legal egg collection. With a friendly wave, he sets off back to the research station for a nap before his evening work, and at that moment a horn sounds and egg collection can begin.

In the late 1980s, representatives from the village approached biologists who were studying the arribadas to ask if something could be done to legalise egg collecting within sustainable parameters. They were concerned about the huge numbers of poachers who were descending on the village, stealing the eggs and intimidating locals. A plan was drawn up with the government, and the self-regulated, women-run Ostional Development Association was established to allow certain families to harvest a limited number of eggs on the first three mornings of an arribada. (These eggs would be damaged by subsequent nestings anyway, and researchers calculate a 5% greater hatchlings rate following earlier egg removal.) As part of the agreement, the community cleans the beach and protects the turtles and their eggs from poachers and manages the enormous numbers of tourists that descend on Ostional during arribadas. The eggs harvested are licensed for sale at the same price as chicken eggs to deter the black market, and the proceeds used for community projects.

All around me, local men and women are dancing a tarantella on the sand, stamping gently in bare feet to find nests. Everyone is wearing some sort of turtle motif – on a necklace or a printed T-shirt. One by one, they drop and burrow. There are very few turtles on the beach now – the next wave won’t come ashore until nightfall. Malena squats beside me, her hands moving rhythmically in the sand to uncover the denser layer below. My heart drops like a stone to my stomach as I realise this is the nest I watched being so carefully prepared, filled and covered.

“Come here,” Malena calls. I join her and she grabs my hand and pushes it down into the hole. “Can you feel them?”I root around a bit but am relieved to only feel sand. Malena puts her own hand in and expertly retrieves a couple of eggs, which she puts in her sack. “Try again,” she tells me.

This time, I scoop my hand imitating Malena’s angle and feel the eggs. I pull one out. Malena applauds me and repeatedly dives back into the hole, bringing out handfuls of eggs for the sack. She empties the nest, re-covers it and moves a couple of metres away to start another one. I sit, holding the egg I retrieved in my hand. It is soft and warm and leathery, denting in my grasp. I have become the thief of my nightmares, plundering the nursery as soon as the mother has left. This is the antithesis of the environmentally responsible culture I have been brought up with – stealing eggs is bad enough, but stealing the eggs of a protected species is unforgiveable.

“You can eat it raw like that,” Malena calls. And she demonstrates, tearing the shell and popping the contents in her mouth. Around me, in remarkably short time, sacks have been filled with eggs. It is already hot out here on the black sand and everybody wants to get back to the shade of the village. I help Malena tie her sack and together we trudge back over the sand to her house. En route, with frequent pauses – turtle eggs are unexpectedly heavy – Malena, who is president of the Ostional Development Association, tells me how the project has changed the community.

The pioneering vets who save rhinos left for dead by poachers – in pictures Read more

Ostional is a small, poor village wedged between two rivers, the mountains and ocean. During the rainy season, when the rivers flood, the village is cut off completely and must survive on whatever food it has stored. Many people have deserted Ostional to find work in the cities. Now, Malena says, the egg licensing gives people a living wage and has paid for training, maternity cover and pensions. People are returning to the village and making lives for themselves here. “The turtles are our lifeblood,” she says. “We love them. They mean everything to us here.”

But isn’t this simply legalising the poaching that was happening before, I ask her. “Before, this was a dangerous place,” Malena says. “The beach was dirty and full of poachers from everywhere. The police came and there were gun battles. My grandmother got shot by mistake, and she died. After that, we said: no more! This is our village and these are our turtles.” I am struck by the fierce determination of this woman – a grandmother herself now – and what she and her band of female neighbours have achieved.

We need the world’s resources now more than ever – to develop the economies of poor countries and to support our growing population. But we need to find a way of sustainable exploitation. What Malena and her neighbours are trying in Ostional is also being tried in rainforests for timber and in the oceans for fish. It’s too early to tell whether we are truly able to limit our extraction of these endangered resources to levels that are sustainable, but early signs show that where the long-term needs of communities living in these vulnerable environments are included, ecosystems are managed better.

We have reached Malena’s house now, a simple wooden dwelling subdivided with panels, where she lives with her daughter, granddaughter and a few chickens. “You must try a tortilla,” she smiles, listing numerous health-giving properties. As she heats a pan on the stove, chops coriander and onion, and whisks up a bowl of freshly gathered turtle eggs, I ponder how strangely and randomly we assign value to living things – and how deadly the consequences. Many environmentalists believe the legal egg collection here contributed to the murder of Jairo Mora by ensuring a market for turtle eggs. Yet I can see how the importance of the egg market to this Ostional economy is giving the turtles far greater protection. As we try to negotiate a path between the competing demands of the human and natural worlds, Ostional shows us that it needn’t be one or the other. In truth, to protect the wildlife, you must also protect human life. The turtle omelette was delicious.

• This is an edited extract from What’s Next? edited by Jim Al-Khalili, published by Profile (£8.99). To order a copy for £7.64 go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99