Scientists have never fully understood what drives whole pods of whales to beach themselves in mass strandings along the world's coastlines, but it's possible the impetus may not originate on Earth.

The same phenomenon that produces spellbinding aurorae like the northern lights could also be triggering mass whale strandings, with powerful solar storms causing disruptions in Earth's magnetic field that throw off the animals' powers of navigation, according to a new study.

A team led by physicist Klaus Vanselow from the University of Kiel in Germany suggests that a mass stranding of almost 30 sperm whales on European shores in January 2016 and a pair of major solar storms that occurred only weeks before in December 2015 are no mere coincidence.

When powerful solar storms happen, large volumes of plasma, radiation and high-energy particles are hurled from the Sun in events called coronal mass ejections (CMEs), which ultimately collide with Earth's magnetic field.

The collisions can cause geomagnetic storms, significant disruptions in the field which can cause wide-ranging shifts in the position of magnetic field structures.

During the December 2015 solar storms, the researchers calculate that these shifts exceeded 460 kilometres (286 miles) in the region surrounding the Norwegian Channel.

In light of previous research suggesting that whales and other marine animals navigate themselves through the sea by reference to Earth's magnetic field, Vanselow suggests that the disruptions produced in 2015 could have severely waylaid the group as they explored the North Sea – with fatal consequences.

"Sperm whales are very huge animals and swim in the free ocean so if they are disrupted by this effect, they can swim in the wrong direction for days and then correct it," Vanselow told Matt McGrath at BBC News.

"But in the area between Scotland and Norway, if the whales swim in the wrong direction for one or two days, then it is too late for them to go back, they are trapped."

That's because the 29 young male sperm whales that were the victims of the 2016 strandings fell prey to shallow waters in unfamiliar surroundings, and were unable to retrace their route before marooning themselves on beachfront belonging to the UK, Germany, the Netherlands, and France.

The team suggests these animals, which hail from a region called the Azores in the mid-Atlantic, wouldn't have previously received much if any exposure to strong geomagnetic disruptions, something that could have also played a part in their stranding.

"Where the polar lights are seen, that's the region with the most geomagnetic disruptions on the Earth's surface," Vanselow told the BBC.

While there's no way to actually prove the researchers' hypothesis – as other factors could have also contributed and led to the whales beaching themselves – it's not the first time solar storms have been linked to mass strandings.

A team from NASA is currently investigating how whales and other marine animals appear to lose their way when magnetic anomalies strike – and the scientists think learning how solar storms influence animal navigation might even prevent the worst landfalls from taking place.

"If we understand the relationship between the two, we may be able to use observations of solar storms as an early warning for potential strandings to occur," says NASA collaborator Katie Moore from the International Fund for Animal Welfare.

"This would allow stranding responders in global hotspots, and really around the world, to be better prepared to respond, thus having the opportunity to save more animals."

That kind of intervention may be some way off for now, but it's reassuring to think that scientists are looking into ways to save these magnificent creatures from this cosmic re-routing they could never hope to naturally circumvent – which basically amounts to the Sun breaking their GPS.

"I think it's the same for whales," Vanselow explained to Ryan F. Mandelbaum at Gizmodo.

"They do not realise that the Sun is changing the geomagnetic environment for a short time."

The findings are reported in the International Journal of Astrobiology.