In the midst of the hot and humid Colombian rainforest a nearly naked man walks silently among the trees, looking for his next meal. Spotting a distracted monkey, the hunter readies his blowgun and darts. One shot will be enough. According to a first-hand account from 1825, the dart is "certain death to man or animal wounded by it". That's because it is laced with poison.

Hunters from Colombia's Embera tribe regularly hunted birds, monkeys and other small animals using poison darts. The poison came from bright yellow frogs just a few centimetres long.

A single "golden poison frog" harbours enough poison to kill 10 grown men, making these frogs perhaps the most poisonous animals alive. They are one of many species of toxic frogs, which are known as poison dart frogs. They are all small: the largest are no more than 6cm long, and some are just 1.5 cm. How did these tiny, beautiful creatures become so poisonous, and why?

Millions of animals produce toxic substances, but most of them are not poisonous. To be poisonous, an animal must be toxic to eat, or in extreme cases, even to lick. For instance, venomous snakes like the lethal inland taipan are not poisonous. They are only dangerous if they bite you, injecting their venom into your bloodstream.

Only a handful of species pose a risk to humans

The golden poison frog has no such limitations. It keeps its poison in glands beneath its skin, so any reckless human taking a bite would be in trouble immediately.

Other poison dart frogs are far less toxic than the golden poison frog, and only a handful of species pose a risk to humans.

Obtaining the poison for use on darts was a gruesome process, according to an account published in 1978. Local people would "catch the frogs in the woods, and confine them in a hollow cane." When they needed poison, they would take a frog and "pass a pointed piece of wood down his throat, and out at one of his legs."

Unsurprisingly the frog would become agitated, and begin sweating poison, "especially on the back, which becomes covered with white froth". The people dipped their arrows in this poisonous liquid, which remained potent for a year.

The poison is called batrachotoxin. It causes paralysis and death when it enters the bloodstream, even in minuscule amounts.

Batrachotoxin belongs to a large group of chemicals known as alkaloids, which are found in many animals and plants. With the exception of a few non-poisonous species, all other poison dart frogs also use alkaloid poisons.  

For example, Anthony's poison arrow frog lives in the forests of Peru and Ecuador. It is dark red or brown, with yellow stripes. It harbours two powerful alkaloids called epibatidine and phantasmidine.

According to a study published in 1998, even tiny amounts of epibatidine can cause severe damage to an animal's brain and muscles. This can lead to respiratory paralysis, high blood pressure, seizures and death.

What's more, it's not just adult frogs that are poisonous. Baby frogs are too.

In a 2014 study, Ralph Saporito of John Carroll University in University Heights, Ohio, found that mother frogs supply their tiny tadpoles with poison. The tadpoles absorb the toxin and become poisonous themselves.

Frogs feed their tadpoles on their own unfertilised eggs, and it's this food source that supplies the poison. "Mom is able to provide them a defence by placing alkaloids in the eggs," says Saporito.

This has the useful effect of scaring off predators that might otherwise eat the tadpoles. "It appears that the alkaloids in tadpoles are sufficient in deterring some potential arthropod predators such as hungry dragonflies," says Saporito. They might also protect against infection.

Deterring predators seems to be a major use for the poisons in at least some species.

That might not sound like much of a defence. After all, in theory the frog has still had a chunk bitten out of it, which won't do it any good. But in practice predator attacks hardly ever go that far, thanks to the frogs' other weapon: colour.

Poison dart frogs are brightly coloured, with a wide range of patterns. Their colours include white, black, yellow, orange, red, green, blue and everything in between, says Kyle Summers of East Carolina University in Greenville, who has studied them for 30 years.

In nature, bright colours are often a warning sign. Many animals are dishonest: they boast bright colours yet pose no danger. However, most poison dart frogs are not bluffing. Their colours send a clear and honest signal that would-be predators should avoid them, says Summers

In a study published in 2001, Summers showed that the most conspicuous frogs, those bearing the brightest colours, were also the most poisonous. His team rated how conspicuous the frogs were against a typical background, and found that this correlated strongly with how toxic their poison was.

The predators may well have got the message, according to a 2012 study by Molly Cummings of the University of Texas at Austin.

The brighter frogs were more toxic

Her team collected strawberry poison dart frogs from western Panama, and measured how toxic the frogs' skin chemicals were. She also measured their colours precisely, using an instrument called a spectrophotometer, and determined how easily predatory birds could detect them.

As before, the brighter frogs were more toxic, and Cummings' calculations suggested they were also more conspicuous to the birds. "This relationship informs potential predators, such as birds, just how much of a punch these frogs deliver," says Cummings. Back in 2006, she also showed that predatory birds quickly learn to avoid the colourful frogs.

Clearly, being poisonous is advantageous to the frogs. The question is, how did they become so lethal?

Poison dart frogs all belong to the same family of frogs, the dendrobatids.

It seems the frogs are descended from something like a true toad

The group was born some 40-45 million years ago, somewhere in the forests of northern South America, says Juan Santos of the University of British Columbia in Vancouver, Canada. "During this time most of South America was warm and covered with tropical forest, and the Andes were not higher than 2500m above sea level."

The poison dart frogs' ancestors were not poisonous, and nor were they colourful or small, says Santos.

In a study published in 2003, Santos attempted to trace the ancestry of the frogs by examining their genes. The results are not definitive, but it seems the frogs are descended from something like a true toad, complete with warts.

This common ancestor was probably "diurnal", meaning it was active during the day, says Santos. Most of the 300 known poison dart frogs are diurnal, whereas most other frogs, including all of the poison dart frogs' likely ancestors, are active at night. "We expect that diurnality is derived from a nocturnal ancestor," says Santos.

In that respect, modern poison dart frogs are similar to their last common ancestor. But in another respect, the ancestor was completely different: it wasn't poisonous at all.

"The origins of toxicity are more complicated," says Santos. The poison evolved some time after the origin of the poison dart frog lineage, according to Santos' data, and different groups evolved it at different times.

"There are between 4 and 5 independent origins," says Santos. The first was around 30 million years ago, while the most recent was just 2.5 million years ago.

The ancestors of poison dart frogs may have started eating toxic ants

The key to the story is that the frogs don't make the poisons themselves. They get them from animals like ants that they eat. "These prey items are the main source of poison frogs' toxins," says Santos.

The ancestors of poison dart frogs may have started eating toxic ants by sheer chance, and begun harbouring the poisons in their bodies. Some of the key chemicals on the frogs' skin have been traced to ants, beetles and millipedes.  

This seems to fit with Santos's claim that the frogs acquired the ability to make poison on several different occasions. "Most of these origins are associated with locations that were, or are, covered with dense tropical rainforest with enough diversity of ants and mites," says Santos.

These early poison dart frogs had a big problem: not being poisoned themselves. It is not yet clear how they managed to withstand and retain the poison, says Summers.

Rainforests are dangerous places, with many predators out to eat a tasty frog

One idea is that they had a high metabolic rate, meaning their bodies could process nutrients and other chemicals quickly. "The high metabolic rate could have been crucial in allowing members of this lineage to withstand and process the toxins," says Summers. In effect, the frogs were "pre-adapted".

That may explain how the frogs became so poisonous, but why did they do it? Rainforests are dangerous places, with many predators out to eat a tasty frog. But many similarly small animals have found less extreme ways to survive, such as camouflaging themselves.

There may have been something specific about the poison dart frogs' ancestors that made them predisposed to defend themselves using poison. Or it could be largely down to luck, says Summers.

Whatever the truth, nowadays the frogs are not the only ones benefiting from their poisons. Neuroscientists are studying the toxins in the hope of designing new drugs.

"It's not that the compounds cause toxic effects that is of interest here," says Richard Fitch of Indiana State University in Terre Haute. "It's the way they do it that is useful to the scientist and physician."

You wouldn't give phantasmidine to someone who's in pain

There is precedent for this. Some alkaloids turn out to have anticancer activity, while others serve as stimulants similar to caffeine.

Epibatidine and phantasmidine are prime examples. They may be lethal, but they also both numb pain. They act on the same receptors on our brain cells that respond to nicotine.

You wouldn't give phantasmidine to someone who's in pain, but by studying its structure and chemistry it may be possible to design better pain-killing drugs. Fitch and his team are developing upgraded versions of phantasmidine that are similar enough to still ease pain, but without the toxicity.

"If we can cut the key just right, we get the activity we want," says Fitch. "That's perhaps a tall order, as we don't quite know what the lock looks like, but we have a key and that's a start."

This new use for poison dart frogs may well have replaced their previous one. The practice of using them to make poison darts was in decline as early as the 1970s. It's difficult to tell if the Embera people still do it, says Summers, because the area where they live is "remote and very dangerous because of guerilla activity".

The skin of strawberry poison dart frogs can fend off some bacteria and fungi

If no one is making poison darts anymore, that's good news for the frogs: at least they aren't being pierced with sticks. But like many amphibians, poison dart frogs are vulnerable to extinction, as the forests they live in have been hacked back. They may also be at risk from a fungus called chytridiomycosis, which kills amphibians by infecting their skin.

Might their poisons offer them any protection? The skin of strawberry poison dart frogs can fend off some bacteria and fungi, according to a study published in January 2015. But that doesn't necessarily mean it can fight off the chytrid fungus.

"At this point, we do not know if the alkaloids in dart poison frogs offer them any protection from chytrid," says Saporito. "This is something we are beginning to actively study in my lab."

It seems unlikely that the poisons will be enough to save the frogs, but they might at least buy some time.

Updated 23 April 2015: This article has been amended since its initial publication to clarify some of the statements made.