A D.C. Superior Court judge ruled yesterday that Georgetown University violated the city's Human Rights Act when it denied two homosexual student organizations the right to receive funds for campus activities.

Judge Leonard Braman rejected the university's contention that it had not discriminated against the students because of "sexual orientation," which is specifically prohibited by District law, but had refused to fund the organizations because their "goals, philosophy and intended activities" conflicted with fundamental teachings of the Catholic Church.

Braman said the university's position was "untenable" and an "unmistakable violation" of the law.

The ruling set the stage for a trial later in the year of the issue of which violation takes priority -- the one determined yesterday by Braman on the grounds of the student's sexual preference, or the one alleged by the university to exist because of the limitation imposed on its practice of the Catholic religion and the upholding of its precepts. The issue is seen by observers as one that will be decided on a much higher judicial level than Superior Court.

The dispute arose after Georgetown officials denied the two student groups -- one representing about 50 undergraduates and the other about 20 law students -- several thousand dollars in student activity funds.

University officials contended in letters to the students that "official subsidy and support of a gay student organization would be interpreted by many as endorsement of the position taken by the gay movement on a full range of issues." Lawyers for Georgetown argued yesterday that the university's action was protected under the First Amendment guarantee to permit the practice of religion.

The homosexual rights groups involved are the Gay People of Georgetown and the Gay Rights Coalition of Georgetown University Law Center. They filed a lawsuit that asserted that denying them formal recognition constituted a violation of the city's human rights laws.

The homosexual students have the support of the D.C. Corporation Counsel's office, which entered the case on behalf of the students. The case is said to be the first test of the "sexual orientation" protections afforded by the 1977 Human Rights Act, which prohibits discrimination based on "race, color, religion, sex . . . [and] sexual orientation."

Attorneys Ronald E. Bogard and Leonard Graff, who represented the students, said that if Georgetown prevailed, a significant portion of the human rights law could be gutted.

"It would mean," said Bogard, "that a corporation -- that's all Georgetown is, a business -- could say, 'I'm religiously affiliated, thus I don't have to abide by your human rights act. I don't care if you're black, Jewish or a woman.'"

Charles H. Wilson, an attorney for Georgetown, said Georgetown had applied a "neutral policy."

"If the philosophy [of a student organization] collides with the teachings of the Catholic Church on issues of faith or morality," he said, "then any student organization, whether it was a homosexual or a violent organization, would be denied [funding]."

Braman, however, rejected Georgetown's position, saying the university was contending that discrimination was permissible because "the discrimination was applied uniformly."

The ruling apparently does not mean that Georgetown immediately must fund the two student groups, lawyers said. The university currently allocates about $200,000 among an estimated 90 student organizations. Each group must meet certain criteria to be eligible to receive money and recognition, such as having at least 12 members and an official constitution, and must demonstrate that it serves an educational, social or cultural purpose.