Eighteen former District public school employes, who sued the school board last spring after they were fired for alleged drug use, will divide $315,000 as a result of an out-of-court settlement reached Monday, attorneys for both sides said yesterday.

The employes, who worked as school bus drivers, aides and mechanics, were among 27 who lost their jobs in August 1984 during a mass screening of school transportation workers. The American Civil Liberties Union filed suit in U.S. District Court against the District school board in March, contending that the drug tests to which the employes submitted were unfair and inaccurate.

Art Spitzer, legal director of the ACLU in metropolitan Washington, said the suit asked for $500,000 in damages for each of the employes dismissed because of the test results.

The suit was not filed until this year, Spitzer said, because the ACLU was awaiting the District Court's decision in another suit between the District school board and a school employe who tested positive for drugs. In February 1986, the court ruled in favor of the employe.

"I think they saw the handwriting on the wall," Spitzer said. "The District thought they might have to pay a lot more if they went to trial."

In the last few years, millions of employes and job applicants around the country have been asked to submit to drug testing. Some of the tests have resulted in firings, and some who have lost their jobs have charged that the random tests violate their Fourth Amendment rights against unreasonable search and seizure, and challenged their dismissal in court.

The District school board has appealed part of the 1986 ruling in the other case, insisting that drug testing does not violate employes' Fourth Amendment rights. The District Court of Appeals has not yet resolved the issue, Spitzer said.

Still, Spitzer hailed Monday's settlement in the District as a "significant victory" for the fired employes. He said they chose not to bring the case to court partly because they believed it would take at least another year for a ruling to be made, and damages awarded.

In addition to dividing the $315,000, Spitzer said, the former employes will have the 1984 test results erased from their employment records and will be allowed to return to their jobs.

Attorneys for the District school board said yesterday that five of the employes have decided to return to work. But as part of the settlement, the attorneys said, the employes agreed to be tested for drug use during routine physical examinations.

"That was an essential component of the settlement," said an attorney for the District school board. "The District is very concerned about the safety and well-being of public school children being serviced by these employes."

The suit contended that results of the kind of test administered to the employes in 1984 did not confirm the presence of drugs in their bodies, Spitzer said. He also charged that the fired employes did not receive due process when they were dismissed.

Those allegations are neither confirmed nor denied in the settlement, according to attorneys for the District school board. But they acknowledged that the 1986 District Court decision involving another school employe who was fired after taking the same kind of drug test partly influenced their decision to settle the matter without going to trial.