Scientists have found a way to save millions of pounds worth of crops every year – turning the moths which eat them gay.

Codling Moths lay their larvae on apple and pear trees and the worms can ruin entire harvests by tunnelling through the fruit.

Previously, the only way to prevent them killing crops was spraying fruit with pesticides, which had the effect of killing other harmless insects and disrupting the food chain.

Instead, scientists at Sainsburys have discovered a method to coat the larvae with female pheromones, which are usually used by females to attract males.

The method means that males are attracted to other males and females remain unfertilised, preventing reproduction.

A Sainsburys spokesman told the Daily Express: “Codling moths have the ability to devastate entire crops if left uncontrolled. The new technique means males are attracted to males, disrupting the breeding cycle and reducing dramatically the number of eggs able to produce baby moths.”

He added: “Pheromone is a natural substance and, unlike other chemicals, is safe to use on both conventional and organic crops.”

Alan Stubbs, chairman of conservation charity Buglife, said ­said he approved of the method.

“Using a technique to protect crops that does not rely on sprays which affect other species is the safest way to control a pest,” he added.