In a decision believed to be the first of its kind in the U.S. intelligence community, a middle-level employe at the super-secret National Security Agency who was discovered to be a homosexual has been allowed, after an investigation, to keep his job and security clearances that allow access to highly classified material.

Traditionally, U.S. intelligence agencies, including the NSA, CIA, FBI and military intelligence units, have either fired or forced the resignation of employes found to be homosexual, on grounds they were vulnerable to being compromised and therefore were poor security risks.

As a condition of being allowed to keep his job, the NSA employe had to tell his family about his homosexuality, to reduce the risk he could be blackmailed into divulging secrets.

Although NSA officials believe they have handled this sensitive case with "maturity and rationality," it has touched off a behind-the-scenes dispute within the intelligence community among some of those relatively few officials who know about it. "The decision is a major appointment to many of us," one official said.

Some other officials at the NSA and CIA, however, believe the decision was "probably" a good one, and that in any case it was inevitable, given the increasing tendency in the courts to hold that homosexuality, without further evidence of behavior that could lead to security problems, is a questionable basis for denying access to secure information.

Nevertheless, the NSA case is extremely sensitive, in part because the agency is among the most sensitive in the U.S. governement, being involved in code-breaking and worldwide monitoring of communications. The situation has been handled internally by the agency at its Fort Meade headquarters. There has been no publicity about it. Anticipating some negative reactions, officials briefed senior intelligence officials in other agencies and some members of the Senate and House select committees on intelligence.

NSA officials decline to identify the employe, but sources say the case began to unfold last June when it was discovered that he was homosexual. Sources say the employe has worked at NSA for about six years. According to Franklin E. Kameny, a member of the D.C. Commission on Human Rights and a prominent on Human Rights and a prominent gay activist who represented the NSA employe, the employe was asked to resign by a lower-level supervisor at NSA in July.

Kameny said the employe contacted him and decided he would not resign and would fight any attempt to force him out. After an NSA investigation and efforts by Kameny, who is not a lawyer, and his client, the agency decided late in October to let the employe stay after the employe pledged to do several things.

According to Daniel C. Schwartz, NSA general counsel, the NSA first temporarily lifted the security clearances of the employe "as is customary and routine whenever there is significant new knowledge about a person." Then there was an investigation and the case was decided, he said, "pursuant to certain commitments made by the employe to the agency." These included, Schwartz said, a commitment to tell his family about his homosexuality. Secondly, the employe, who is not married, agreed not to engage in any public activity which may be illegal. This refers to some state and local jurisdictions where homosexual acts are illegal. Finally, he was advised, as is routine at NSA, to limit the freedom with which he told people where he works.

Kameny views the decision as "marking a major breakthrough" in the "apparent easing of NSA policies." In all of the intelligence agencies, Kameny said, "past practice has been that the individual was called in and ordered to resign and, unfortunately, almost everybody has."

Schwartz, however, said the case "is not a major shift of policy in how we deal with homosexuals," Schwartz said that all cases are looked at on an individual basis and in this case, in which the employe acknowledged he was a homosexual, it was determined there was no security risk.

U.S. intelligence agencies are generally governed on such matters by CIA policy, which says that homosexuality is a "factor" to be considered in granting security clearances. Actually, CIA officials say that most homosexuals are not specifically because of their sexual preferences but because lie detector tests show they are lying when questioned about it.

Nevertheless, the CIA's director of recruiting, in a straightforward response to questions about hiring practices raised by the Harvard Law School, said that "a pattern of recurrent adult homosexual conduct can be expected to lead to an adverse determination [by the CIA] based in large part on the undue risk that the individual may be exposed to pressure by hostile intelligence services."

Sources say there are three other cases pending at the NSA involving homosexuals, involving applicants for jobs, not existing employes; thus the current decision is viewed as especially important. While some intelligence officials are sympathetic to the NSA decision, they believe the United States could become "the laughing stock" of the intelligence business by hiring acknowledged homosexuals.

"There remain people throughout the intelligence community," one NSA official acknowledges, "who really do feel deep in their guts that homosexuals are not appropriate people to be given security clearances. There are a lot of that ilk who are upset by the decision."

Beyond the merits of the NSA case itself, there are also political factors that are potentially volatile. Though the agency's top officials decided that it didn't seem appropriate to take away a person's job solely because of sexual preferences, and that NSA would almost certainly have lost a lawsuit in court, there is concern that public attention will bring down the wrath of the conservative "moral majority" upon the agency.

News of the situation at NSA was fist brought to the attention of this newspaper through anonymous callers. This came shortly after an article in the Washington Star reported that the NSA director, Navy Vice Adm. Bobby Ray Inman, was expected to be named deputy director of the CIA according to what the paper said were "well-informed sources in the transition process." Some intelligence officials believe the subsequent revelations about the homosexual case may be meant to embarrass Inman, who is a highly respected figure within the intelligence community.

Inman has been approached about the CIA job, but informed sources say it has never been clear how official those approaches were and that Inman has consistently made it known that he does not want the CIA job and prefers to stay where he is. Transition sources said yesterday they didn't think a final decision had been made on offering the post to the admiral.