WASHINGTON (AP) — Dog detectives might be able to help save ailing citrus groves, research published Monday suggests.

Scientists trained dogs to sniff out a crop disease called citrus greening that has hit orange, lemon and grapefruit orchards in Florida, California and Texas. The dogs can detect it weeks to years before it shows up on tree leaves and roots, the researchers report.

“This technology is thousands of years old – the dog’s nose,” said Timothy Gottwald, a researcher with the U.S. Department of Agriculture and a co-author of the study. “We’ve just trained dogs to hunt new prey: the bacteria that causes a very damaging crop disease.”

Dog sleuths are also faster, cheaper and more accurate than people collecting hundreds of leaves for lab analysis, according to the study in the Proceedings of National Academies of Sciences. Citrus greening — also called huanglongbing — is caused by a bacteria that is spread by a tiny insect that feeds on the leaves and stems of citrus trees. Once a tree is infected, there’s no cure.

The disease has also hurt citrus crops in Central and South America and Asia.

In one experiment in a Texas grapefruit orchard, trained dogs were accurate 95% of the time in distinguishing between newly infected trees and healthy ones.

“The earlier you detect a disease, the better chance you have at stopping an epidemic” by culling infected trees, explained Gottwald.

WATCH: What’s on your citrus fruit? Trump’s EPA fights to keep controversial insecticide in use

Matteo Garbelotto, who studies plants at the University of California, Berkeley, says the new research elevates the study of dog sleuths in orchards from anecdotal to field-tested, showing that dogs can detect an infection well before current methods. Garbelotto has been involved in similar research but had no role in new study.

Another plant scientist, Laura Sims, of Louisiana Tech University, said she was impressed by the rigorousness of the research. She applauded the steps taken to determine if the dogs were sniffing out the bacteria itself or a plant’s response to an infection.

To do that, the researchers infected a variety of unrelated plants with the bacteria in a laboratory. The dogs were still able to pick out the infected plants.

“You’ve seen dogs working in airports, detecting drugs and explosives,” said Gottwald. “Maybe soon you will see them working on more farms.”