Because of its hilltop position, up by the university, the Bergen Natural History Museum overlooks much of the old town. Conversely it can be seen, with its grand arched windows, from almost everywhere.

Steep streets run down directly to the harbours and fish market. It's a mid-19th- century classical historicist building, set in semi-formal gardens. The facade is painted pale greyish-yellow, with grey mullions round the windows. It hasn't changed much, outside or in, since it opened in 1865.

One dull day in March, when Bergen was in thaw and great mounds of gritty snow lay at street corners, I pushed open the intimidating front door and made my way upstairs. The walls of the stairway bristled with the skulls and antlers of deer mounted on boards and, like a kind of doorman, a human skeleton hung in a glass case, but he didn't ask for my ticket.

I wandered through the displays of stuffed birds, that mainstay of 19th-century museums: a snowy owl eternally offering prey to its fluffy chicks; dull-eyed, long-dead ravens.

Then came the most prestigious room, the main hall. And there, entering through its double-height double doors, I was taken aback.

The architect must have intended a grand room – big enough to host a sizeable dance, or a city congregation – with thick wooden floors and cream-coloured pillars rising toward elaborate capitols, and arches, and arched windows, but the symmetry he intended was confounded because of the whales. The skeletons of the whales. You walk through into the Hvalsalen and, immediately above, side by side, like vast oxen yoked together to haul the most terrible plough, are the jaws of two great baleen whales. Not just the jaws – the entire skeletons, the ribcages, the great fans of the scapulas and fin-bones, at the sides, the long receding trains of the spines. The bones are brown with age – and there are not one or two but 24 cetacean skeletons crowded under the ceiling. Four and twenty! Whales like sardines! Some face east, some face west. And dolphins, too, and on the floor, raised on something like bed legs, is a stuffed basking shark and, in a corner, the skull of a sperm whale – dense, complex convolutions of bone.

The Hvalsalen. Whale Hall. What else could it be called? They were all there, such a roster of whales – the baleen whales, sei and humpback, right, fin and minke whales – even the blue whale, and the toothed whales, too, sperm and bottlenose, narwhal and beluga, and the Sowerby's beaked whale, and, affixed to the walls, dolphins, almost dainty in comparison; the killer whale and the bottlenose.

Such bones as I never saw, hanging above my head.

Of course the blue whale was largest of all. I decided to walk under its full length, and count my steps. First I walked under the smooth horizontal arch of the jaw, and its palate, where the baleen had once hung, sheets of age-browned bone. Then came the solid complications of the skull, now under the barrel of the ribcage, the ribs curving down, enclosing and protecting nothing but air. I kept walking, counting. As I passed the basking shark I surreptitiously touched its cold skin, rough as sandpaper. I passed a dolphin, small and lithe, and making for the door. Still the blue whale went on overhead. Above the basking shark hung a huge sunfish, an eerie-looking object hanging from a wire, more like a black moon with an eye. Still I walked on, counting until the spine ended. Fifty-seven paces. Less an animal, more a narrative. The ancient mariner.

On a central pillar, neatly painted in Norwegian and English, were the words "Do not touch the animals", but it was a bit late for that. The whalers' harpoons had got them; the flensing iron.

But despite the weight of bones, the effect of the Hvalsalen was dreamlike. The vast structures didn't seem to offer any reproach. Rather, they drew you in. Undisturbed for a century, they had colluded to create a place of silence and memory. A vast statement of fact: "Whales is what we were. This is what we are. Spend a little time here and you too feel how it is to be a huge mammal of the seas, to require the sea to hold you, to grow so big at the ocean's hospitality."

A blue whale (Balaenoptera musculus) photographed by diver in the Pacific Ocean. Photograph: Mark Conlin/Getty Images

Maybe too few people are sufficiently keen on whale bones to want to talk about them, because two curators were kind enough to interrupt their day to meet me. Or perhaps they feared they'd be dealing with someone upset or outraged by it all. Either way, I was greeted by a younger man, fit and strong, as so many young Norwegians appear to be, called Terje Lislevand, who was an ornithologist. He accompanied a more senior figure, a petite dark woman called Anne Karin Hufthammer, who was the head of osteology herself. It was her Whale Hall, so to speak. More osteology than you could shake a stick at.

They led me back upstairs to the Whale Hall, and for half an hour or so I enjoyed a private guided tour.

They showed me a rare "right-handed" narwhal, with the tusk growing from its right tooth, rather than the left. They pointed out the great whales' pelvic bones, which were small and delicate, like paper boats, and which hung under the immense spines. Dr Hufthammer said these were of special interest to evolutionary biologists and specimens were rare. These were all that remained of the whales' sojourn on land, millions of years ago, early in their evolutionary history. When the whales, or proto-whales, took to the seas, they lost their legs and their pelvises shrank away to this.

Then Dr Hufthammer stopped by a glass case, asking: "Have you seen this?" Within the case was a spherical object, 2ft across, dense and mean, like a huge swollen black eye. It was the heart of a killer whale. A deep red and black biological engine, with a sprig of aorta reaching out of it.

If the issue of whaling was at all sensitive, I didn't know. The Norwegians still hunt minke whales, you could buy whale meat at the fish market down the hill, but it couldn't be avoided. I broached it by saying: "I presume these whales were all hunted…"

"Actually, the Hvalsalen is a bit of a mystery. There is no record of how they got here… or how they got inside the building… how they were prepared."

We were moving back toward the door, under the jaws of the humpback, when Terje said: "You know the museum is closing?"

"No! I'd no idea… Closing for ever?"

"For four years. It's being closed for renovation and repair. The building, the exhibits, everything. We are all moving out!"

After 130 years, the offices and laboratories were packing up and moving to different quarters, to make room for new exhibition space. A bright, modernised Natural History Museum would reopen to the public in due course.

I'd been lucky to turn up when I had. At the risk of being rude I said, "You know, I hope this Whale Hall won't change. It has such… atmosphere."

They began speaking together and, though it was in Norwegian, I got the impression that the future of the Hvalsalen had been the subject of some debate. Then they laughed, and Anne turned back to me with a smile of satisfaction. It had indeed been discussed and she had prevailed. She had overcome "the minimalisers", as she called them.

The Hvalsalen would not be changed.

However, she went on, there was unavoidable work to be done.

"They are all very dirty. Perhaps dangerous – maybe they will fall! Look…"

She led me to the arched windows and pointed up to the right whale.

Now, under her direction, I could see cracks in the ribs, fractures, bits fallen off.

"There is much damage. Also, you see up here…"

Now Anne pointed up to the last few tapering yards of the fin whale's spine. The vertebrae deepened in colour as they reduced in size, until the last were treacle-brown and sticky looking.

"And here, too, on this one – this brown colour? It's oil. The oil is still coming, the dirt sticks to the oil."

"Still?"

Poor whales, didn't they know when to stop? The same whale oil that greased the machines and lit the streets and parlours, the oil of soap and margarine. All that oil! Here they were, dead for a century, still giving out oil.

So that's how it was. Very soon, the Hvalsalen's doors would close to the public. An international team of specialist conservationists had been hired and would shortly arrive, and for two years they'd work on the great whales.

"Will you lower them down?"

"No. It's not possible. They would collapse."

Instead the conservation team would build scaffold and platforms, and spend their working days up among the whales themselves.

"What an extraordinary project – the cleansing of the whales!"

Five months later, in the closing days of August, when a hint of autumn was already in the Bergen air, I climbed through a hatch, crept out on to a plywood floor, and found myself standing high in the Hvalsalen windows, next to the freshly cleaned right whale. It was astonishingly light – it seemed to radiate such a thick yellow light.

The word that came to mind was "buttery". The bones, I mean.

Beside me, project director Gordon Turner Walker stood with his arms folded, as though awaiting a verdict.

"It's so bright!" I said.

"It's bleached underneath – I think that's been light reflected off snow that's done that. But, yes, 2kg of dust came off it. That's how sad we are – we weighed the dust! Conservation, though… once you've established the protocol, it's just glorified housework."

I looked a little longer – and began to realise there was a smell, too, when you got close.

Warm and slight, not unpleasant, it seemed to be seeping from within the bones, as though cleaning them had released it from a long imprisonment. It was the smell of something from – oh – a long time ago, early days at primary school.

The vertebrae in front of me felt grainy, not quite cold, and very slightly waxy.

"Wax crayons! That's the smell! The thick ones – 'chubby stumps', we called them."

"Probably made of whale oil," Gordon said. "Most things were."

The skeleton seemed to emit a 19th-century glow. You could imagine the kind of light a whale-oil lamp would have cast on the corner of some Victorian street.

"Yup," he said. "A million whales up in smoke, and this is all we've got to show for it."

Gordon was a Yorkshireman who had spent years in Norway; a specialist conservator with, he'd soon told me, a love of bone. That was his speciality. Archaeological bone. "Bone is my passion, a beautiful material, a wonderful material…"

We left the right whale hanging, in its sunlit window, and descended.

Gordon led me to a different ladder, which led up through a trapdoor and on to the platform above. The platform was made of metal planks, and it ran back under the three biggest baleen whales, the ones nearest the door, the sei and humpback, side by side, then, nudging them along, the immense jaws of the blue whale itself. Beyond, yet to be reached, a crowd of others.

The right whale, in its private space, was a shining destination, the "after" in a colossal before-and-after task. For now, though, climbing that ladder was to enter into a strange lofty rag-and-bone shop, a beanstalk that entered into a kingdom of grime. It wasn't obvious from the floor just how much grease and dirt lay on the bones' upper sides.

What seen from below had seemed like the whales' stoicism felt now like tremendous fatigue. But they were working on it. Standing on either side of the sei whale's ribcage, as though grooming it, each with a stand of tools and a vacuum cleaner between them, were Zina Fihl and Marielle Bergh, young women from Denmark and Sweden respectively. Zina pulled off her mask to greet me. Like Marielle, she wore workmen's clothes. Her blonde hair was tied back; she had a toothbrush poking from her overalls, which made me smile.

"Tell me you're not cleaning a whale with a toothbrush…"

"Very important tool!" she laughed.

"Toothbrush!"

"Toothpick!"

"Cotton buds!"

"We tried dry ice and lasers, but they didn't work, so it's back to the household chemicals. Ammonia and ethanol, and a brush, and water and a sponge."

I had two DAYS. Zina loaned me some work clothes with padded knees and let me creep among the whales' skeletons. Sometimes we chatted as they worked; at other times I wandered in the gloom of the museum.

Sometimes they were kind enough to show me things – for example, when the conversation turned to baleen, these all being baleen whales, Gordon asked me if I'd ever actually seen baleen. Aside from some ancient corset stays of my grandmother's, I hadn't, so he went to the store and returned with something which looked exactly like a shred of tyre, the kind of thing you see at the verge of the motorway if a lorry had a blowout. It's made of the same stuff as our fingernails, and this piece was so hard you could knock on it, but in life, when the whale's mouth is constantly opening to the water, the baleen is soft, and frayed where the whale's huge tongue licks against it.

Being up on their platform, in the presence of these whales, allowed you to note differences in their anatomy, gave you a feel for them. It was as though you could imagine – purely by their skeletons hanging from their chains – differences in the characters they had in life. A kind of phrenology, I suppose, and probably meaningless, but the sei was regarded by all as an elegant creature. The sei's ribs were slim, more so than the right whale's and certainly more slender than the humpback's. The lowest ribs splayed wide and, though it's an odd word to use of a whale, they looked spidery; they almost wafted at the air, as if rowing it along.

Hanging beside the sei, the humpback was more a figure of fun. Thick-set – and filthy. In life humpbacks are characterful. They breach up out of the water, "spy-hop" to see what's going on in the upper world, raise and slap their flippers – and there was a stocky robustness to this one's bones, in particular the scapulas. The humpback looked especially dirty, but its turn would come to be cleaned. "Oh, he'll be quick," they said. "Then we'll get on to the blue." For now, as he waited, the humpback was a useful shortcut. A rat run, you might say.

To save bothering with ladders and trapdoors, to get across from one side of their platform to another, the conservators just crawled between the humpback's ribs into its chest cavity, then came stooping out of its belly, and carried on their way.

I'd learned from several quarters that the Hvalsalen was a bit of a mystery. There were few records, if any, of how the whales got to Bergen, or how they were prepared or manoeuvred up the stairs, piece by piece presumably – if indeed they had been brought via the stairs at all – or how they were hoisted aloft, and chained to the ceiling.

A mystery, and Gordon had made a point to me that I reluctantly had to concede. It was when I'd been admiring the poor bright right whale. He'd said: "I love bone, but you know what I also love? These chains."

"Really?"

Zina Fihl vacuums the sei whale skeleton. Photograph: Christina Holmefjord

"Yes. I love metalwork, too. Archaeological metal, especially iron. And these chains – look at them! It's part of the thing – it's like the whales were giants that had to be restrained. They're all handmade – all hand-forged. We don't know much about how the whales got here, but there must have been a very good blacksmith on site. And the nails, see? All the metalwork that holds the skeletons together – everything's handmade. You couldn't do it now. The way I see it, this Hvalsalen is a monument to the whales – their only monument – but it's testament to those working men, too."

As to how they got there, though the records were scant, certain inferences could be drawn. Terje had said that the signs that hung from one or two whales, giving the dread dates 1867, 1879 – dread in whale annals, that is – and the place, Finnmark, coincided with the invention of the exploding harpoon, and the opening of a whaling station there. Before that giant leap for humankind, fin whales had proved too fast to catch. But others may have been strandings. It happens.

Later, over tea, I asked the conservators if they thought of the objects they were working on as animals, or objects. "Animals," they said. They were all of a mind. Several times I heard the words "waste" and "slaughter" and "holocaust" and "shame". There are only 4,000 blue whales alive now. At the time of their deliverance, the moratorium of the 1960s, we had slaughtered our way through 350,000.

Two or three times on my visit I sat under the blue whale's jaw, or even within the cage of its chest, the thick portcullis of its ribs descending around. You got used to the scale, even to holding conversations in these surrounds. To sit within the creature's ribcage was like being in a very strange taxi, caught in traffic.

But you could conduct a thought experiment. You could sit within the blue whale and look back, following the spine with your eye as it voyaged above the hall, curving very slightly, continuing between the other whales, suspended every few yards by those chains and rods, until it tapered to an end far away. Then there would have been the tail, too, something the width of a small aircraft. Despite the size, you could, with a minimum of effort, extend your sense of self, and imagine this was your body moving through the ocean. You could begin to imagine what it might feel like, to be a blue whale.

Of course it became ridiculous only to watch. Housework? I could do that.

Marielle and Zina, voices muffled by the masks they were wearing against the ammonia, were still at work on the sei whale – as they would be for some time yet.

I called over. "Can I help?"

"We thought you'd never ask! Come on – let's get you a mask."

I crawled through the humpback's ribs toward them and found Marielle sitting under the spine with a sei rib across her lap.

They'd undone some bolt or other and taken it off, the better to clean it. There was another waiting attention, too. So I sat beside her, cross-legged with a sei whale rib arcing my lap, too, a piece of evolutionary work curved and honed, with a slight kink to it, and a club-like thickness at the end.

Marielle showed me what to do. First you spray your rib with ammonia from a plastic bottle, then you take a brush, the kind you'd use for the washing-up, and work the ammonia on to the rib, working into the grain. Then you wipe it down with a sponge, simple, and at once a layer of dark dirt comes away. The bone emerges lighter and brighter. This is gratifying.

It was the quiet lull of mid-afternoon. We talked a little. I suppose we could have been housemaids, set to polish the silverware in some mansion, except for being high above the floor, with a whale crowd around us. It was quite absorbing.

We worked into the stubborn parts of our respective bones and, indeed, toothpicks were provided, to winkle out hardened little deposits of gunk. Soon, it would be the humpback's turn, then the blue whale's.

The blue whale, awaiting the attention of the toothpick. Then, they'd have taken everything we could throw at them. The full gamut of human attention – from the exploding harpoon and flensing iron, to the soft sponge and the toothpick.

The sound of the young women's voices and the brushes. The whales' otherworldly presence.

"Ever seen a whale?" I asked Marielle. "Alive, I mean?"

"No! None of us has. We were talking about this just the other day. We really should try; we spend all day with them here…"

"You get such a feel for them, don't you think? All their differences. Different species, different characters?"

"I would love to see a whale…"

"We should go together," said Zina. "Whale-Team-building!"

"Oh, you should!" I said. "Really – find a way." Of course, all you see is a blow, a back, a fin or tail. To have to imagine all this…"

I watched as she turned the rib in her gloved hand, appraising it.

"That's coming up nicely." There is some old magic to do with cleaning bones. Something ancient and fairy story. Something prehistoric, maybe. All those chambered cairns piled with clean bones.

The end of Marielle's rib rested on a cushion of foam so it wouldn't be damaged. "Do not touch the animals"! Sometimes our species beggars belief.

I scooshed some more ammonia on to mine, sponged it off again. All across the hall, the crowd of whales waited their turn for treatment, huge and otherworldly. Not otherworldly. Actually, of this world, as they had been for a very long time, long before we appeared.

I turned the rib in my hands, stroked it with the sponge. Shame and shame.

"How clean does it have to be, Marielle?"

All unwitting, I'd asked the conservator's question of questions. She just smiled.

This is an extract from Sightlines by Kathleen Jamie, published by Sort of Books, £8.99. To order a copy for £7.19 with free UK p&p go to guardian.co.uk/bookshop, or call 0330 333 6846. Kathleen Jamie will read from and discuss Sightlines on 24 April at the Fruitmarket Gallery, Edinburgh