The snow drifted high around the little outbuilding of a restaurant I was in, metres from the gelid ocean, but the place was warm, decorated with fish nets and crab carapaces and the occasional gnome. On a dish in front of me was liver sausage cured in soured whey, dung-smoked lamb and a couple of slabs of rotten skate that looked like they were designed by H R Giger and smelled strongly of urine. The liver sausage was appropriately sour but otherwise sausage-y, and the lamb benefited greatly from the fact that sheep apparently don’t digest very well, meaning that it could just as easily have been called grass-smoked lamb.

As I raised my fork with my first piece of the rotten fish, a voice boomed at me from across the room.

Skata! Ha!”

You may also be interested in:
• The deadly dish people love to eat
• The fish that ‘won’ a revolution
• The ‘quintessential dish no-one knows

It was an Icelander in his mid- to late 20s, short, bearded and a little stout – a guide bringing in a couple of Chinese tourists. His name was Gísli. He’d been my guide the night before in this small northern town of Akureyri. We’d spent a lovely evening chasing the aurora borealis in his SUV, listening to the glockenspiels, tambourines, bowed guitars and falsettos that loom so large in Iceland’s famously soft, ethereal music.

“Good? Do you like it?” Gísli boomed. I told him I hadn’t tried it yet.

“You’ll love it! It’s horrible!”

You’ll love it! It’s horrible!

Then I tried it. The skate was hot, just out of the oven, but the burn I felt on my tongue was chemical, a result of some strong ureic reaction going on in this decomposing fish corpse. I may have made a face.

“Ha!” Gísli was back across the room with his clients, but had kept an eye on me. “Terrible, right? Ha, I love it! They give me one, I’ll finish it and ask for more. Good Viking food! Strong! Ha!”

It was hard to tell with his thick sweater and large jacket, but he may have done a pec flex with that last ‘ha’.

I finished the rest of the fish and went back to the buffet for a little lamb face. It was my second day of a week-long trip, and only my third meal. But right from my lunch the previous day at a place called Kaffi Kú (Cow Café), where I ate a big bowl of beef stew in a glassed-in dining room that jutted out into and over the stables where the pre-stew cows were milling about, I got the impression that Icelanders have a different relationship to their food than most.

Bringing people up-close to the source of their food is admirably rational, but that rotten fish seemed anything but. And as I ate my way down to and across capital city Reykjavik, eating more rotten, sour and dung-smoked foods, it occurred to me that Icelandic food culture was not only odd, but possibly unique. Though eating cheaper and often less-obviously appetizing parts of animals and plants is common, every other national cuisine I’d tried took pride in how good they were able to make their calf stomach (Bulgarian shkembe), sheep’s brain (Moroccan mokh mchermel) or cows’ tails (Jamaican oxtail stew). But Icelanders like Gísli, it seems, revel in how bad their traditional food is.

People tend to think that Vikings are to Icelanders roughly what Romans are to Italians. And Vikings were notoriously tough, laughing in the face of hardship, able to withstand extreme suffering and strike terror into the hearts of their enemies.

But here’s the thing: Icelanders aren’t Vikings. They never were. According to a relatively modest note near the beginning of the 871±2 permanent exhibit at the Reykjavik City Museum, Icelanders are mostly descended from Norwegian farmers who wanted to get away from the Vikings and just tend their fields and livestock in peace.

“That’s one of the great new things,” said Jesse Byock, author of Viking Age Iceland and a professor of early Icelandic history and Old Norse saga literature at both the University of California, Los Angeles (UCLA) and the University of Iceland. “Icelanders never really connected themselves to the Viking world, they were always Icelanders. But the younger people are very enthusiastic about Vikings, and they’re all working hard to show that they can eat this stuff.”

Icelanders have always eaten this food – the famous cubes of rotten shark called hákarl are available at the average corner shop in Reykjavik – but as tourism outstrips agriculture and fishing, accounting for 31% of total export revenues in 2015, the younger generations have embraced the tourist-friendly Viking mantle, possibly even identifying more closely with this Netflix-friendly heritage.

Icelanders revel in how bad their traditional food is

But according to Byock, the actual history behind this food, and modern Icelanders’ relationship with it, is far more interesting than bushy beards and horned helmets.

When the first Scandinavians made their way to Iceland’s shores in the year 871 (give or take a couple of years – hence the title of that exhibit), they found a densely wooded island that seemed ripe for cultivation. But as settlers started showing up over the next 100 years, only really arriving in earnest around the year 1000, they slowly realised that all those birch forests they were cutting down to build and heat their houses weren’t going to grow back with their sheep grazing everywhere. And without the trees, the topsoil began to erode, making it difficult, and often impossible, to either grow crops or pasture their livestock.

They were far enough from the European mainland to make importing food just as impossible, and so Icelandic culture and society evolved in a state of near constant hunger, always on the verge of famine, having to make do with whatever they were able to scrounge and forage, and using manure in the absence of wood for heating and cooking.

“Let’s say there’s a storm,” Byock said. “A whale is dead, sinks to the bottom, the gases blow up, it floats to shore, you get tonnes and tonnes of meat. What do you do? Well, first, you kill each other to see who gets it, then you bring it up, you get these barrels of whey and drop huge chunks of whale into it.”

Icelanders’ ancestors were tough all right, but they weren’t Vikings. They were starving farmers, doing whatever it took to stay alive.

For centuries, this foul-tasting food was the difference between life and death

Though Icelanders don’t eat beached whale (hvalreki) anymore, this scavenging approach to food is also the origin of hákarl, a milder version of the skate I had in Akureyri. Though the flesh of the huge Greenland shark is usually toxic to humans – the high concentration of urea leads to skin, eye and respiratory distress – once it’s allowed to rot a bit, traditionally in a hole on the beach (nowadays in plastic containers), it becomes a valuable source of protein. Rays and other large sharks are equally toxic, and equally edible when left to ferment or rot. And since it’s all already rotten, it keeps pretty well, too.

So for centuries, this foul-tasting food was the difference between life and death. Icelanders’ ability to deal with the really, really horrible taste was as important to the existence and eventual success of Iceland as the actual Vikings’ ability to deal with travel- and battle-related hardship was to mainland Scandinavia’s.

With two million people a year travelling to the country, the national diet has been changing over the past three decades, leaning much more heavily towards pizzas, pasta and burgers. But this is still a small nation, just 330,000 people, and their traditions are not only tourist attractions; they’re what anchor these displaced Scandinavians to their past, and each other.

Every Christmas, and every Þorri – the old Icelandic month that corresponds to the end of January and beginning of February – is given over to traditional foods, which, in addition to all the rotten fish, includes rams testicles (súrsaðir hrútspungar), boiled sheep’s heads with the wool singed off (svið), smoked mutton (hangikjöt), seal flippers (seishreifar) and whale blubber cured in sour milk (súr hvalur).

You can find hot springs like the famous Blue Lagoon and the ice fields that cover the island’s interior in any number of places, but I know of no other country whose history, evolution and survival are so consciously intertwined and celebrated in its food.

And to be honest, the lamb face is pretty good.

CORRECTION: A previous version of this article misspelled the name of artist H R Giger and incorrectly translated 'hangikjöt' as raw mutton. These have been corrected.

Culinary Roots is a series from BBC Travel connecting to the rare and local foods woven into a place’s heritage.

Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital and Travel, delivered to your inbox every Friday.