A venomous sea snake wards off predators with a master illusionist's trick by making them think its tail is its head, scientists have learned.

Despite being highly poisonous, the yellow-lipped sea krait is vulnerable to attack while probing for food with its tail exposed.

But it fools sharks, carnivorous fish and birds with a sideways twist which makes the snake's tail appear to be its head, which is recognisable by its distinct black and yellow markings.

Even sharks are wary of sea snake's heads because the creatures are among the most venomous of all snakes.

The discovery was made by Danish naturalist Dr Arne Rasmussen during a diving trip off Bunaken Island in Indonesia.

Spotting one of the snakes, he was surprised to see its "head" rear up towards him while the tail investigated the coral.

Dr Rasmussen, from the Royal Danish Academy of Fine Arts, School of Conservation in Copenhagen, only recognised the illusion when the real head emerged.

Each time the snake stuck its head into a coral crevice, it twisted its tail. Viewed side-on, the tail tip looked strikingly similar to the top of the snake's head.

Further studies of 98 sea kraits housed in museums in Paris, Berlin and Copenhagen and wild snakes in the Solomon Islands confirmed the find.

All had distinctive long black bands on the tip of the head and tail as well as a bright yellow horseshoe that was deeper in colour than markings on the rest of the body.

"The value of such an adaptation is twofold; it may increase the chances of surviving predator attack by exposing a less 'vital' body part, but more importantly it may deter attack in the first place if attackers perceive the tail as the venomous snake's head," said Dr Rasmussen, whose research appears in the journal Marine Ecology.

Other species of sea snake - such as the thick-tailed sea snake, the curtus sea snake and the Persian Gulf sea snake - may employ the same trick, Dr Rasmussen believes. All have matching markings on the head and tail.

More than 65 species of sea snakes inhabit the tropical waters of the Southern Hemisphere, and all are extremely poisonous.