PANA, Thailand - To stop wild elephants rampaging through their crops, farmers in Thailand put up electric fences, burst firecrackers and even switched their crop from pineapples to pumpkins, which the pachyderms don't relish much. Nothing worked, so the villagers decided on Plan Bee.

In a pilot scheme run by the Thai Department of National Parks, farmers are deploying bees as a new line of defence, exploiting elephants' documented fear of bee stings. The idea to play on the phobia came out of Oxford University research and has been used successfully for several years in Africa. It's now gaining a toehold in Asia.

The problem is quite severe in the eastern province of Chanthaburi, which has thick forests near farming communities that grow rice, cassava, pineapple and rubber.

"Starting two years ago, elephants have come and destroyed farmers' crops almost every day," said Prasit Sae-Lee, the head of the local administration. "Elephants travel in a herd, a big herd, razing everything to the ground everywhere they go. The ground is flattened so much so that a ten-wheeled truck can drive through after they had gone."

Government officials suggested farmers stop growing pineapples that elephants love. "The latest suggestion is for us to grow pumpkins. But it didn't solve anything. They destroyed pumpkins. They pulled roots outs and stepped on them and even ate them," Prasit said.

Help for the residents of the remote Pana village came from a government wildlife research station, which is helping them raise bees. It's a simple technique. Traditionally bee hives are placed on the ground, but here researchers raise them on stilts, putting them at eye level for the elephants. The string of bee-hive boxes are connected with a rope to create a fence.

When the elephants try to enter, they push at the ropes and shake the beehives, causing the bees to swarm out in a fearsome cloud of buzz and venomous sting that the animals are unlikely to forget.

"At first I thought it would not work. Even the forestry officials did not think it would work," said Boonchu Sirimaha, 66, whose family became the first in the village to participate in the research project. "But after we put the beehives up (two months ago), it worked. The elephants were stung by the bees and they have not been back since."

The downside of the project is that it is not feasible on a large farm because it would involve putting up thousands of beehive boxes, which would prove to be expensive. Each box has about 10,000 bees and costs 4,000 baht ($115). But it is a good solution for small farms, and for people like Boonchu who want to protect their homes, which can be ring-fenced by beehives.

"They will have to figure out ways that are cheap for everyone to use," said Tony Lynam of the New York-based Wildlife Conservation Society. "Methods they can set up by themselves such as fences with bells, and guard posts ... firecrackers, beehives, all of these things can be used together but any one of those methods by itself won't be a solution," he said.

Boonchu's daughter, Dararath, is happy with the bee strategy.

"The elephants come out at night. They come all the way up to the house," said Dararath, 36, recalling the horrors of the past. "They've banged against our door and windows. They've tipped over parked motorcycles, pulled down tarpaulins and knocked over our washing machine," said Dararath, who has now turned into a beekeeper.

A spin-off benefit is that for every 50 boxes she cultivates, she harvests 300 kilograms (660 pounds) of honey, which sells for 150 to -500 baht ($4.30 to $14.30) per kilogram, or $9.50 to $31.50 per pound. The beeswax can sell for about that much.

There are an estimated 3,000 wild elephants, according to the Thai Elephant Conservation Center in Thailand. And as farmers push into forests for agriculture, elephants have been forced to venture out of their shrinking habitats in search of food.