Thousands of years' worth of the Earth's history has been lost after ice cores from the Canadian Arctic have melted away.

The cores – long cylinders of ice extracted from glaciers – were stored in a custom-built refrigerator costing $3m (£2.38m) at the University of Alberta in Edmonton, until a malfunction meant they rapidly heated up.

What was once a time capsule of trapped gases and particles that allowed scientists to study previous atmospheres was reduced to a puddle within a matter of minutes.

"For every ice-core facility on the planet, this is their number one nightmare," University of Alberta glaciologist Martin Sharp told the Edmonton Sun.

"I've had better days, let's say that," he added.

The collection, known as the Canadian Ice Core Archive, included 1.4km of ice core samples – equivalent to 10,000 years of history.

More than 180 metres was lost in the malfunction, which amounts to 12.8% of the collection.

"When you lose part of an ice core," Sharp told the Guardian, "you lose part of the record of past climates, past environments – an archive of the history of our atmosphere.

"You just don't have easy access to information about those past time periods."

Sharp discovered the melting 45 minutes after it started when a high-heat alarm sounded at the facility. When he arrived, the samples were at 40C.

"It was more like a change room in a swimming pool than a freezer," added Sharp.

Thankfully for researchers, much of the damage was averted because much of the collection was stored in a different facility at the request of a television crew. The Daily Planet had been filming a documentary about the collection and asked if they could be moved in a place with better lighting.

"That's basically what saved us," Sharp said.