William A. Norris, the federal judge who ruled in 1988 that the Constitution’s equal protection clause guaranteed that gay people could serve in the military — a decision that presaged the Supreme Court’s legalization of same-sex marriage — died on Jan. 21 in Los Angeles. He was 89.

The cause was heart failure, his wife, Jane Jelenko, said.

In the 1988 case, Judge Norris — sitting on the United States Court of Appeals for the Ninth Circuit, in San Francisco, as part of a three-judge panel — issued a 60-page concurring opinion in the court’s 2-to-1 ruling striking down the Army’s ban on gay soldiers. It was the first time a federal appeals court prohibited a branch of the armed services from excluding people on the basis of sexual orientation.

Judge Norris wrote that the Army’s ban would apply even to those who desired homosexual contact but engaged in no sexual act, while heterosexuals who engaged in homosexual acts while intoxicated might not come under the ban.

“If a straight soldier and a gay soldier of the same sex engage in homosexual acts because they are drunk, immature or curious, the straight soldier may remain in the Army while the gay soldier is automatically terminated,” the decision said.