For farmers in the Taita hills in southern Kenya, elephants are a menace: they raid crops and will occasionally injure or even kill people.

Farmer Richard Shika, 68, has had some close encounters.

He feels lucky to be alive. Almost exactly two years ago, local media reported that a 3-year-old girl had been trampled to death by an elephant in Taita Taveta county, her mother injured.

The area where Shika has his farm is almost surrounded by Kenya’s biggest National Park. The border of Tsavo East National Park is less than 10 kilometers (6 miles) to the east, and Tsavo West curves around to the north, west and south. The parks have always been unfenced, allowing animals to migrate. Increasingly, that puts them in the path of humans.

“The places and infrastructure that we humans develop hinder the migratory routes and paths which elephants used to take,” explains Yuka Luvonga, who researches human-elephant coexistence for conservation organization Save The Elephants.

Elephants eat about 150 kilograms (330 pounds) of vegetation a day, so keeping them off farms is tricky, especially if forage is scarce elsewhere.

If farmers try to chase them off, as Shika did, the elephants will sometimes turn and defend themselves. Kenya Wildlife Service and conservation organizations tracking human-elephant conflict estimate that 30-35 people are killed every year in elephant-related incidents across Kenya.

Communities will sometimes retaliate by spearing or poisoning elephants, but there are other solutions, as farmers here have found.

One of them is bees.

With help from Save The Elephants, Shika is one of 50 farmers who have hung beehives from wires between poles around their farms. If an elephant touches the wire, the hives are rocked, disturbing the bees. It’s an army of tiny security guards that keeps elephants well away from the farm.

"Even if the elephants destroy my crops, I still get to harvest honey from my beehives which I can sell," Shika says. "Between January and March, I harvested about 5 kilograms and between April and June I got 24 kilograms."

Changing crops can also make a difference. Elephants love maize and watermelons. But sesame? Blegh.

Sesame plants produce a scent that actively repels elephants, so for 70-year-old Gertrude Jackim, swapping out maize and green grams for sesame was a no-brainer.

"Someone like me cannot fight the elephants, I cannot chase them because I am old," she says. "So now, my work is to plant these sesame seeds that elephants can't destroy or eat. They do not like how this plant smells."

She is one of 100 farmers who have been supported to adopt sesame seed production.

Farming practices that deter elephants – like beekeeping and growing sesame – have made coexistence much easier for farmers like Shika and Jackim.

Conservationists hope that in the long run, this will win hearts and minds in an area where human-elephant conflict had reached worrying levels.

Only then can both people and elephants here continue to thrive.

AP Video by Zelipha Kirobi