In Reykjavík, Icelandic goat is increasingly appearing on the menus of the city’s best restaurants. At the contemporary restaurant Nostra, dried goat hearts get shaved over grilled cucumber, while at Dill, Iceland’s first Michelin star restaurant, goat cheese is served alongside beets and crowberries.

Krauma, a geothermal bath and spa facility in the western part of the country, has become one of the biggest buyers of products from Háafell, Iceland’s first commercial goat farm. One of its signature dishes is an Icelandic goat platter, with thinly sliced goat meat that has been cured with thyme, salt and sugar like a carpaccio, as well as rosemary smoked goat, goat sausage, goat feta cheese and pickled vegetables.

“We try to keep it local, and people are curious about the goat,” says Franklin Margrétarson, the chef of Krauma’s restaurant.

For the first time since Háafell’s owner Jóhanna Thorvaldsdóttir took in four Icelandic goats in 1999, she is making a profit from them. Goat cheese, ice-cream, meat and the breed’s cashmere-like hair are bringing in money to help care for the animals, as are increasing numbers of tourists stopping for a tour to see a unique heritage breed that very nearly disappeared.

Brought by the Vikings from Norway when they settled 1,100 years ago, the Icelandic, or Settlement, goat was once widespread in the country. However, a mini ice age that began in the 1300s and lasted for several centuries made living in Iceland quite difficult. The fattier meat of the sheep was in high demand and goats fell out of favour. Numbers dwindled over the centuries and by 1962 there were just 70-80 left in the entire country.

When Thorvaldsdóttir acquired her first four, the country’s remaining goats were spread out on more than 40 isolated farms. There were inbreeding problems and many infections. The breed could easily have become extinct.

Thorvaldsdóttir decided to leave her job as a nurse, and began breeding goats. There was little income, but her flock grew to several hundred strong. Then, after Iceland’s financial collapse, interest rates sky-rocketed, and in 2014 her farm was in foreclosure.

The food writer Jody Eddy, who had visited the farm while writing a book, launched a crowdfunding campaign. Conveniently, right around that time several of the goats appeared on season 4 of Game of Thrones; in one scene, a dragon breathes fire over a small herd and snatches one up into the air. More than $115,000 was raised – enough to pay off the banks and keep the farm going in the short term.

Facebook Twitter Pinterest Jóhanna Thorvaldsdóttir and one of her goats. Photograph: Nicholas Gill

Thorvaldsdóttir now has 250 goats on her farm, far more than anyone else in the country, and the nationwide population has grown to 1,200. Still, the breed’s survival is not guaranteed.

When she first tried to sell goat meat, people gave her funny looks. “Is it even edible?” they would ask. But public opinion is changing quickly; more restaurants are serving goat, and more Icelanders and tourists are acquiring a taste for it.

Gísli Matthías Auðunsson chef at Skál! restaurant in Reykjavík said: “A year ago, she [Thorvaldsdóttir] was having trouble selling some parts of her goat and we ended up buying 260kg of meat. I hadn’t even tried Icelandic goat before. It surprised me how delicate it was and how easy it is making delicious food with it.” Matthías now serves goat often, either braising the meat or serving the cheese with birch sugar, fennel crackers and rhubarb.

“When saving a breed, you have to use it,” says Thorvaldsdóttir. “If they aren’t giving you income, no one will work with them.”