The U.S. Court of Appeals ruled yesterday that the D.C. Department of Corrections had violated sex discrimination laws by failing to promote a nurse in her forties who asserted that she was passed over in favor of a less-qualified younger woman who had a "sexual relationship" with the doctor who promoted her.

After a six-day trial last year, U.S. District Court Judge Gerhard A. Gesell ruled against Mabel A. King, a nurse at the D.C. Jail for 10 years. Gesell said King had offered "no positive proof of sexual conduct or sexual attractiveness" between Norma Jean Grant, a nurse in her twenties who was given the supervisory job, and Dr. Francis Smith, who was then the jail's chief medical officer.

Smith recently has become the Corrections Department's acting assistant director for medical services.

Both Grant and Smith denied the charges.

A panel of three Appeals Court judges said yesterday that Gesell had set an improper "insurmountable" standard for the plaintiff to meet by requiring her "to produce direct evidence of a consummated sexual relationship."

Writing for a three-judge panel, Judge Harry T. Edwards said that, under previous decisions by both the Appeals Court and the U.S. Supreme Court, only indirect or circumstantial evidence is needed to prove a sex discrimination charge.

Edwards said the trial had produced evidence of "a sexual relationship, i.e. kisses, embraces and other amorous behavior, which concededly played a substantial role in Ms. Grant's selection for promotion."

The Appeals Court said King should be awarded the promotion and receive back pay.

Yesterday, her attorney, Robert M. Adler, said the ruling will protect male and female employes "who are left behind" as a result of a sexual relationship between a supervisor and an employe.

LeRoy Anderson, spokesman for the D.C. Corrections Department, said the department would not comment on the case.

In his ruling last year, Gesell said that because of "the vagaries and infinite manifestations of sexual stimulation," the courts must act with "great caution" in bias cases.

Gesell wrote that in reaching a decision in King's case he was "hampered by the unreliability of the testimony . . . and the obvious bias of most witnesses on either side." Edwards noted that Gesell had rejected testimony by jail officials that Grant had been selected for the supervisory job because of her superior qualifications.

Joining in the opinion were Judges J. Skelly Wright and Carl McGowan.