In the wee hours of a night last month, an Illinois chemist was awakened by a phone call, answered groggily and heard the excited voice of a New York chemist on the other end of the long-distance line.

"I've got Stadol!" Dr. George Maylin of Cornell University told John McDonald, the chemist for the Illinois Racing Board. His discovery marked the end of the latest battle in the on-going war between trainers who give illegal drugs to horses and the chemists who try to detect them.

The latest such battle had been waged over the narcotic Sublimaze, the use of which had reached near-epidemic proportions at the nation's tracks. Sublimaze was not only potent - some horsemen referred to it as "rocket fuel" - but it was practically undetectable.

Finding Sublimaze in a horse's urine, McDonald said, was like trying to isolate one grain of salt in a barrel of sand. But McDonald and racing chemists in Colorado finally found a sophisticated test for the drug, and their breakthrough was quickly followed by a wave of suspensions for Sublimaze use.

McDonald and his colleagues knew that their triumph would be short-lived. It was only a matter of time before the trainers and veterinarians who had been using Sublimaze would simply shift to another illegal medication.

Maryland racegoers might have sensed in April that this was happening. Whenever a new drug comes into vogue, the performance of horses reflects it. Form goes haywire. This happened in 1975 when Lasix was introduced onto the backstretch, and in 1978 when Sublimaze was discovered. At Pimlico it was happening again.

Horse A would beat Horse B by 10 lengths, and B would be claimed by a prominent trainer. A week later, the two horses would met again. Now B would wake up and win by 10. If such a thing happened only once, it might be attributed to the unpredictability of the game. But when a single trainer begins to perform one miracle after another, the reason is likely to come out of a bottle.

As the inscrutable results continued at Pimlico, I received a call from a man who is well-connected in local racing circles, and who told me about Sublimaze long before most racetrackers had ever heard the name. "There's a new drug out," the man said. "It's called Stadol, and the big boys in Maryland know all about it."

Stadol, known generically as butorphanol, is classified by chemists as a narcotic antagonist. If a person takes an overdose of an opiate such as morphine, he is given a dose of its antagonist, which has actions opposite to the narcotic.

But Stadol is a paradox among the antagonists. Instead of having effects opposite those of the narcotic, it has pain-killing properties similar to those of morphine. And, for reasons which are also a scientific mystery, it seems to affect horses' central nervous systems and make them run faster.

Maylin had been hearing about Stadol since the start of the year but, he said, "We can't work on every rumor we hear." Instead he was working on Sublimaze when he found a way to detect the new drug, too.

"The test for Stadol was a spinoff of Sublimaze," he said. "This happens quite often. It's as if you were to start researching one story and wind up with three."

Maylin's test for Stadol is being disseminated to racing chemists around the country, and they will presumably put a stop to its use. Meanwhile, the vets and the trainers continue to search for a drug even newer, stronger and less detectable. The war goes on.