It took a very short time for Dactil the Iberian lynx to prepare his dinner. The four-year-old male clamped his jaws on a rabbit's throat, there were a few twitches of his prey's legs and it was all over. Within minutes, the rabbit had been consumed. Then Dactil wandered off to rejoin his mate, Castanuela, inside their enclosure at the Olivilla breeding centre, near Santa Elena in Andalucía.

Such behaviour is difficult to observe in the wild. For a start, Lynx pardinus is a reclusive hunter that leads its life as far as possible from humans. The lynx, with its distinctive large, tufted ears and woolly side whiskers that grow thicker with age, is also extremely rare. Its territory across Spain and Portugal had already started shrinking in the 19th century, before numbers plunged drastically in the 20th. Habitat destruction, loss of prey and indiscriminate trapping by landowners brought this beautiful predator to the brink of extinction. Ten years ago, there were only around a 100 of them, making the Iberian lynx the world's most endangered species of cat.

But at Olivilla, an ambitious attempt is being made to transform the animal's fortunes. Here 32 lynxes – a substantial percentage of their total population – are provided with shelter with each cat's behaviour being monitored by more than 100 cameras dotted round the centre's 20 enclosures. These images are studied by staff working in a control room that has enough TV monitors to do justice to a particle accelerator. "We can see everything they do, which is crucial when the lynx reaches its breeding season in March," says Olivilla's director, María José Pérez. "We can help if a mother gets into trouble, for example."

The high-tech surveillance and assiduous zoological care performed at Olivilla are critical to the work of the Lynx Life project, which was launched in 2003 and has since raised the animal's population, through carefully orchestrated reintroductions, to more than 300. Zoologists are even talking of moving Lynx pardinus from its category as a "critically endangered" species to "endangered" under the rules of the International Union for Conservation of Nature (IUCN).

The story of the Iberian lynx project is therefore a modestly happy one – so far, at least – although we should be cautious. The Iberian lynx is a distinctive, beautiful creature and an iconic animal for Andalucía. Yet it has required a monumental effort by dozens of dedicated young ecologists, vets and others staff to pull it back from the brink of oblivion. Dressed in their distinctive dark fatigues, Lynx Life workers zigzag the region in jeeps, replenishing stocks of rabbits for lynxes to eat, tracking released animals and generally maintaining the animal's wellbeing.

Saving the lynx has also required political action: the introduction of laws in Andalucía to halt indiscriminate snare-laying by landowners; an intense PR campaign aimed at persuading owners of hunting estates to love the lynx; and the expenditure of €33m (£28.5m) – most of it provided by the government of Andalucía – to fund conservation. A further €50m (£43m) has been committed for work to reintroduce the lynx to other areas of Spain and Portugal, with the bulk of this coming from the EU.

If the story of the Iberian lynx tells us one thing, it is that saving an endangered mammalian predator from extinction is an extraordinarily difficult, expensive business. We should take note when considering how best to save our own threatened predators, in particular the Highland wildcat, whose numbers hover at a dangerously low level. It will not be an easy task. On the other hand, the Lynx Life project demonstrates that it could be done.

Spring is the most pleasing season in the Sierra Morena in Andalucía. The region, home to dozens of estates where deer, red partridge and boar are hunted, is bleached and burned for most of summer and autumn. During my visit three weeks ago, the mountains were cool and green. Rivers and streams were in spate, the holm oaks and shrubs – gum cistus, mastic, rockrose and palmetto – were flourishing, while black vultures and Spanish imperial eagles, some of the country's rarest raptors, swooped overhead.

Most abundant of all were the rabbits, an animal that is of critical importance to the story of the Iberian lynx. Most carnivores have fairly catholic diets and will kill and eat a range of animals and carrion. The lynx has a very different idea of a good meal, however. It is – more or less – rabbit or nothing, a predilection that is, in turn, closely connected to the lynx's physiology.

Lynx pardinus is small compared with other lynx species, including the North American bobcat and the Euroasian lynx from eastern Europe and Siberia. Adults are about two feet tall and three feet long and weigh around 25lb, about twice the size of a well-fed domestic tomcat. The Iberian lynx is a highly effective predator nevertheless. Its hearing is eight times sharper than a human's and its huge eyes allow it to see in extremely dark conditions. It also has powerful jaws and mottled camouflaged markings, features that have combined to make it the most efficient rabbit hunter on the planet. A rabbit caught by a lynx is dead in seconds and consumed in minutes. Only its skin, picked clean and turned inside out, is left. Mice and rats will do – at a pinch – when times are hard. However, without a meal of a rabbit a day, the female Iberian lynx is unlikely to have enough sustenance to reproduce, zoologists say.

This rabbit-hunting specialism has brought problems. In the 20th century, two major disease outbreaks – myxomatosis in the 60s and viral haemorrhagic disease in the 90s – devastated rabbit populations in Spain. The scarcity of food added to other stresses suffered by the lynx, including habitat destruction, caused by the spread of farming and townships, and by the large numbers that were being caught in snares set by landowners to get rid of foxes and other vermin. (In fact, the lynx kills foxes easily and will drive them out of areas as competing predators, a point that the Lynx Life team have had to stress to landowners.)

However, pockets of rabbits survived around Andújar in the Sierra Morena, its scrubland and fractured granite landscape providing a perfect habitat. Here hovered the last relatively healthy population of lynxes in Spain. After snaring was halted, numbers of lynxes began to expand slightly. And it is this excess that is now being exploited to re-establish populations elsewhere – with rabbits acting as bait. "Saving the lynx has revolved around one simple factor: providing them with rabbits," says Jose Maria Gil-Sanchez, a project worker. "If we can get them enough rabbits then we do a lot for the lynx."

Thus Lynx Life developed a twin strategy. Workers began trapping lynxes. Old adults were allowed to go free but adolescents were taken to new regions to set up fresh populations that would be sustained by colonies of rabbits established for their delectation. "To create homes for rabbits, we prune trees and shrubs of their branches, lay these down to cover the ground and the rabbits start to make their homes underneath them," says Simon Miguel, the leader of Lynx Life. Pruning trees of lower branches also improves the growth of nuts and fruits and so deer and boar have more to eat, another factor that has begun to make the project popular with landowners.

Before lynxes – typically a young male and female – are released to a new area of wild land, however, they are placed in enclosures and studied to see how they get on with each other. (Usually they do.) These enclosure are surrounded by electrified fences that might belong in Jurassic Park, a testimony to the lithe ease with which Iberian lynxes can climb and jump. I visited one of these enclosures, which housed two young lynxes, Ibera and Eve, which were being prepared for release. Gil-Sanchez and his colleague Maribel Garcia Tardio scanned the scrub with powerful binoculars and we were eventually rewarded with a clear sight of Ibera. He was looking straight at us, our hushed mutterings having long ago given away our position. He stared for a few more seconds, then he lay down in the sun and after a couple of minutes rolled on to his back with his paws in the air like a cat in front of a fire. This was an animal that was reasserting his rightful place in the landscape.

The second part of the Lynx Life strategy is more ambitious. This involves taking young animals bred in captivity – at Olivilla and a second centre at El Acebuche, in Doñano on the south coast – and setting them free. This is a trickier process, for these young lynxes have never been taught by their parents how to hunt, a key part of lynx family life. Nevertheless, early signs look promising. Last month, the first captive-bred Iberian lynxes were released into the wild and to judge from their movements, followed thanks to radio transmitters fitted to their collars, they appear to be thriving.

It has been a slow, careful business and not everything has gone to plan: an outbreak of kidney disease at one of the breeding centres last year killed a couple of animals and raised fears that reintroductions might have to be halted. Fortunately, the problem was overcome, though such incidents reveal the fragile nature of the lynx's recovery. Omens still look good, however. This month, females have been giving birth at breeding centres and a new generation of Iberian lynxes will be groomed for release into the wild.

Already that is having an impact on human behaviour. At Los Pinos hotel, in the mountains, where Gil-Sanchez and his colleagues gather every morning for breakfast before heading for work, they are joined by groups of hunters and walkers who come to the region in their dozens at this time of year. This year, they have been joined by a new set of visitors: tourists, armed with binoculars, whose one ambition is to catch sight of an Iberian lynx. The creature's fame has spread and could, it is hoped, bring new revenue to the region in the form of conservation tourism. This is the lynx effect.