After 18 years of legal struggle, compounded by delays and defeats, 15 gardeners at the National Institutes of Health finally won their discrimination suit against the government this week.

In an out-of-court settlement negotiated last spring and executed this week, the federal government paid $167,413 to the 15 men. All are black, and all charged that the NIH discriminated against them in employment practices.

During the progress of the case - through three courts, several administrative hearings and countless delays - three of the plaintiffs died, three retired and two resigned.

In an informal ceremony at the offices of one of the attorneys for the gardeners yesterday afternoon, the 12 NIH employees and the widows of three others received their checks each averaging about $10,000. There were no whoops of joy from the workers, most of them dressed in casual suits or work shirts. They accepted their money quietly, posed for photographers, and recounted for more than an hour the harassment and discrimination they suffered.

Hoover Rowel, an unassuming and quietly determined man who now is a heavy equipment repairman at the NIH campus in Bethesda, led the fight against discrimination.

"It's been a hard road to travel for 18 years." Rowel said yesterday, "I hope I never have to face such a thing again."

Paul Tagliabue, an ACLU attorney who has handled the case since 1969, said the dollar amounts were determined by figuring how much more the men would have earned if they had received the promotions they sought. To that figure was added an inflation factor.

The basis of the gardeners' complaint was that whites were routinely promoted ahead of them in the ground maintenance and landscape unit at the NIH, often when the whites' qualifications were murky. In addition, the 15 plaintiffs charged that they were subjected to racially tinged harassment.

"Things happened that you couldn't believe would happen among human beings," Rowel said. He said he reached the "breaking point" during his years at NIH, and once applied, and was accepted, for a position at the Naval Gun Factory.

But he changed his mind about leaving NIH. "It would have looked as if I was running from something," Rowel said. "I had started so much trouble there, and I didn't want to leave anybody holding the bag."

Rowel said whites who were nice to the black employees were told: "If you stop associating with the niggers, then you'll get promoted.' If they didn't they got rid of them. Blacks didn't ever have a chance of getting anywhere." He said a white who had a discrimination suit filed against him would be promoted "like he was a hero."

Henry L. Bynum, 64, who now is supervisor of the turf unit at NIH, summed up the situation: "They did some dirty, crooked things, and they got away with it."

In one episode from the late 1950s, as recounted in court records, a white man was promoted to heavy equipment supervisor, although several black coworkers were also qualified.

According to a recommendation written for the white man, he displayed "a lot more initiative" and was willing "to forgo his personal obligations by staying a little later (and) . . . studying technical manuals on his own."

Cross-examination revealed, however, that the man stayed at worked later because his car pool left the NIH campus half an hour after his shift ended. As for the technical manuals, they proved to be girlie magazines.

In another episode, Rowel's son was seriously injured in a car accident, and Rowel asked his supervisor, a white, for permission to call the son in a hospital. Permission was denied.

Rowel then requested an hour's annual leave to make the call, and told the supervisor he would list the reason on an official form. For that, Rowel said, he was suspended.

In yet another instance, a white with only a year's experience was promoted to supervisor, although several black coworkers were again qualified. The white proved to be illiterate and had to ask black subordinates to read instructions to him before he could tell them what to do.

Tagliabue said conditions in the ground maintenance and landscaping unit have improved in recent years. "Since about 1971, we feel these guys have been treated fairly," he said.

Edward Nicholas, director of personnel at the NIH, said the agency is "glad the case is settled after all this time." He said the equal employment climate at the NIH has been "pretty good" for a number of years, and that no complaints of discrimination at NIH have been proven since the Gardeners first filed their suit.

The legal history of the case fills nearly a half page of a recent copy of the ACLU newspaper.

For the first six years, the case stayed in administrative channel within the Department of Health, Education, and Welfare.

In 1965, shortly after passage of the Civil Rights Act of 1964, a new, consolidated complaint was filed with then-HEW Secretary John Gardner. Although the Civil Rights Act explicitly excluded discrimination damage claims by government employees, attorneys for the Gardeners felt the climate was right.

It wasn't. In April, 1967, after little progress, the gardeners filed an appeal to Gardner, charging that HEW was "shifting responsibility around like a pea in a shell."

But there was still no resolution until December 1968, when an HEW equal employment oportunity hearing officer found for the gardeners. On the basis of that, the gardeners filed for back pay and promotions with the Civil Service Commission.

In 1969, the commission denied the claim, saying it lacked jurisdiction (the gardeners are paid on a wage board scale, not the GS scale). So the gardeners filed the case all over again before the U.S. Court of Claims.

Government attorneys delayed the case for six more years, however, until the Supreme Court ruled on whether the Court of Claims could award back pay to government employees for past discrimination. When the Supreme Court said that was not possible, in March, 1976, the gardeners were forced to start again.

This time they filed in U.S. District Court. An out-of-court settlement, personally approved by U.S. Attorney Earl J. Silbert, was reached in May.

Yesterday in Tagliabue's office, the plaintiffs were together again: Melvin Allison, Henry L. Bynum, Willie Cade, Paul Dorsey, Otis Israel, Grady Johnson, Walter Jones, James Long, Gabriel Palmer, David Pettus, Hoover Rowel and Ernest Smith.

So were representatives of the original plaintiffs who had died: Toliver Davis, James Greenleaf, and Tom Nettles.

But this time, it was 15 checks for the 15 men or their estates, not another lawsuit.

The gardeners have various plans for the money. Eliza Greenleaf, 72, the widow of James Greanleaf, said she will deposit the money in a bank, "so when I get old and can't get around, I can get somebody to help."

Rowel said, "I'm going to put it away and save it. I'm going to try to pretend I don't even have it."

James Long, 55, said that though he was "very disgusted" that he had to work nearly 19 years at low grade levels before the suit was won, he's glad he participated in the suit.

"It's easier now for the young men coming in," Long said. "I was glad I signed all the complaint lists for their sake."

Would Rowel go through such a lengthy litigation again? He said he would. "But next time," he added, "I like to do it a little bit quicker."