Sea slugs, which appear like a dance of fairies as they swim through the water, will be one of the last enchanting creatures to feature in Sir David Attenborough’s Wild Isles series.

The BBC programme sees the much-loved 96-year-old naturalist and broadcaster shine a light on the challenges affecting the British Isles and celebrates nature that exists on our doorsteps.

In the fifth and final episode of the series, viewers will be invited to take a closer look at ocean habitats and some of their inhabitants – including the royal flush sea slug.

Wild Isles crew during the filming of the programme’s final episode (BBC/Silverback Films/Jacca Deeble/PA)

The footage of the sea slugs marks the first time the species’ mass migration behaviour has been captured on film.

Viewers will see the slugs take off from the bottom of the ocean and swim through the water in what looks like a dance of the fairies to migrate to fresh areas of the ocean, using their mantels as wings as they are carried for miles by the sea current.

Filmed in shallow sheltered bays off the Shetland Islands in Scotland, the crew came across the behaviour accidentally when they were on the hunt for a different species.

Divers with hand-held cameras captured the footage in the water and a time-lapse camera on an underwater tripod was also used.

Elsewhere, the episode explores the biggest fish living in the British Isles – the basking shark – and takes a look at bioluminescence, which is the production and emission of light by a living organism.

The bioluminescence behaviour was previously known but, until recently, impossible to film in such darkness.

As darkness falls and the sea off the coast of Devon becomes pitch black, tiny algae create light when disturbed, like a “burglar alarm”.

Crabs and shrimp that are moving through the water trigger the lights and alert predators, and the light is used by cuttlefish to find their prey.

Speaking about the challenges of filming many of the underwater scenes, Wild Isles producer Gisle Sverdrup said: “The main challenges for the ocean team were the ever-changing conditions on and in the sea.

“Sunny days are best for filming, but when working in the water, underwater visibility is also a major factor determining our success.

“The visibility could change daily, making what was a stunningly beautiful location on one day seem like green soup the next.”

A basking shark with its mouth wide open feeding on plankton concentrated in surface waters close to the island of Coll, Inner Hebrides, Scotland (BBC/Silverback Films/Alex Mustard/2020VISION/naturepl.com/PA)

Towards the end of the episode, in Pembrokeshire Sir David bids farewell to the Manx shearwater bird and delivers a poignant message about the future of the British Isles and the wildlife that calls them home.

Speaking to the camera, he says: “A lot has changed in my lifetime and today the wildlife we still have faces greater threats than ever before.

“Our seabirds remind us that here in Britain and Ireland, we are very fortunate to have some of nature’s greatest spectacles, right on our doorstep.

“Because this is our home, it can only be our responsibility to restore and protect our wildlife.

“Perhaps you can be the first to pass these wild isles onto the next generation in better shape than you inherited them.”

Sir David will sign off from Skomer Island at the end of the Ocean episode.

Across the five episodes, the Wild Isles crew filmed in 145 locations and captured 96 species which took 1,631 days to film.

The series has been funded by nature charities WWF and the RSPB with support from the Open University, and has been produced by Silverback Films – the team behind many of the BBC’s landmark nature shows.

Episode five: Ocean will air on BBC One and iPlayer on April 9 at 7pm.