If you like ham, the Spanish food company La Tienda is betting you'll just love the meat from the Hungarian Mangalica pig, a rare breed that almost disappeared less than 20 years ago.

The distinctive Mangalica pig—known as much for its curly hair as for its fatty flesh—was saved so it can be sold and eaten.

At one time, only 198 purebred pigs remained in the world. Farmers preferred other breeds. "The corpulent Mangalica grows very slowly and cannot be kept in closed quarters. It is therefore poorly suited to modern industrial pig farms, and it has been gradually replaced by modern breeds," according to the Slow Food Foundation for Biodiversity in Florence, Italy.

The resurrection of the Mangalica has been the mission of Juan Vicente Olmos, the head of Spain's Monte Nevado ham company, and geneticist Peter Tóth, who tracked and purchased the last pigs from farms scattered throughout Hungary. After less than two decades of intense breeding, the Mangalica population has now increased one-hundred-fold, with 20,000 pigs living in Spain and Hungary.

If you're hungry for Mangalica ham, it’ll cost you, though. A nine-pound ham goes for $490.

Meanwhile, the resurrection of the Mangalica has become a matter of pride in Hungary, where there is now an annual Mangalica Festival devoted to the pig (and its hams, salamis, sausages and other meat products).

Of course, a breed (like the Mangalica) is not a species, so it couldn't technically go extinct. Still, the salvation of the pig and its unique genes remains a victory. The Mangalica may not be suited to modern commercial livestock production, but it does contain genes that don't exist elsewhere. Some of those genes make it more suitable to cold, mountainous regions. Who knows when and where those rare genes could be of use?

And obviously, trying to save endangered creatures by eating them is, in most situations, a ludicrous idea. But at least in this case, it seems to have worked.

Image: Hungarian Mangalica Pig via La Tienda