Non-lethal mitigation of crop use by elephants Loxodonta africana is an increasingly important part of protected area management across Africa and Asia. Recently, beehive fences have been suggested as a potential mitigation strategy. We tested the effectiveness of this method in a farming community adjacent to Udzungwa Mountains National Park in southern Tanzania. Over a 5.5-year period (2010–2016) a beehive fence was introduced and subsequently extended along the Park boundary. The probability that one or more farms experienced crop loss from elephants on a given day was reduced in the presence of the fence and was reduced further as the fence was extended. The number of hives occupied by bees along the fence was the best predictor of elephants’ visits to farms. Farms closest to the fence experienced a greater likelihood of damage, particularly during the initial period when the fence was shorter. The number of farms affected by elephants declined when the fence was extended. There was a higher probability of damage on farms that were closer to the Park boundary and further from a road. Our mixed results suggest that the shape, length and location of fences need to be carefully planned because changes in a farm's long-term susceptibility to elephant damage vary between individual farms; fences need to be long enough to be effective and ensure that decreasing crop loss frequency is not outweighed by an increasing number of farms damaged per visit.