A National Security Agency employe whose high-level security clearance was withdrawn after he admitted having homosexual relationships should have been permitted an administrative hearing before being removed from his job, the U.S. Court of Appeals here has ruled.

The employe, identified in court documents as "John Doe," was fired in March 1984 after the agency's director found that Doe's clearance for "sensitive compartmented information," a designation above Top Secret, was "clearly inconsistent with the national security."

Without the clearance, Doe was no longer eligible to be employed as a cryptographic material control technician, and he was dismissed.

Chief U.S. Circuit Court Judge Patricia M. Wald, writing for the three-judge panel, reversed a decision by U.S. District Court Judge George H. Revercomb, but the panel did not address constitutional questions raised by Doe.

Leonard P. Bienvenu, who with John G. Gill Jr. represented Doe, said the decision supports Doe's original request for an administrative hearing.

Justice Department officials said they are reviewing the decision and had no comment on a possible appeal.

Procedures that led to the dismissal were triggered by Doe's voluntary admission to NSA officials in March 1982 that he had engaged in homosexual activities during vacation travels abroad. In an effort to clear himself of a charge that he was psychologically unstable, Doe submitted to a psychiatric evaluation.

The doctor's assessment was that Doe was "emotionally starved" and therefore would become "more vulnerable to offers of friendship and more at risk of developing unwise attachments to individuals."

The NSA director said it was not Doe's explicit homosexuality that caused his security clearance to be withdrawn but the "indiscriminate pattern of activity which invites the risk of security exploitation."