A federal judge in San Francisco has cleared the way for drug and alcohol tests of railway workers involved in accidents that cause death or major injuries or damage.

U.S. District Judge Charles Legge sided with the Federal Railway Association when he ruled Tuesday that the tests are legal. The plan covers 200,000 nonsupervisory railroad workers nationwide.

The railway industry is one of the most heavily regulated in the transportation field, and that regulation extends from the railroad itself to the workers, Legge said. He said the railway association designed the testing to promote safety, clearly outlined the limited instances where testing is likely to occur, arranged for independent evaluation of tests and allows for regular union grievance procedures for dissatified employes.

The tests can be given when there is "reasonable suspicion" by a supervisor that a worker has been drinking or using drugs; when a worker has been directly involved in rule violations such as running a stop signal or speeding by more than 10 mph, and when members of an operating crew are in an accident involving death, major injury or release of a hazardous substance.

Drugs or alcohol were linked to at least 9 percent of the major accidents in a 10-year period, and the mandatory tests probably would reveal more, Justice Department attorney Steve Hart said.