A drive to ban discrimination against homosexuals at the University of Maryland has been blocked by university President John S. Toll, prompting an outcry from gay rights activists.

Toll announced Wednesday that he would not support an amendment adding homosexuals to the categories of people protected from discrimination by the human relations code in effect at the university's College Park campus. The code cannot be changed without Toll's acquiescence and his decision is unappealable.

Toll became the target of attacks yesterday by a Washington gay-rights group and by gay activists on the campus who accused him of pandering to antigay sentiments in the state legislature, which sets the school's budget.

University officials adamantly denied that any political considerations played a part in Toll's decision. The university president,who referred a reporter's calls to an aide, was quoted as saying that "such an additon to the [human relations code ] wasn't necessary" and that the code already protects all human rights guaranteed by the state and U.S. constitutions.

"That's the argument they always use to avoid guaranteeing our rights," said Doren Davis, secretary of the Gay Community student group at College Park. When asked to estimate the number of homosexuals on the 31,000-student campus, Davis said that about 250 regularly attend gay social events, but that he believes there are many more.

Melvin Boozer, president of the Gay Activist Alliance of Washington and a sociology lecturer on the College Park campus, said Toll's ruling could become the focal point of stepped-up gay-rights activities in the Maryland suburbs. "We plan to put a lot of resources into problem areas just like this one," he said.

The human relations code bans discrimination against students and faculty on account of race, color, creed, sex, marital status, personal appearance, age, national origin, politicalaffiliation or physical or mental handicaps. It also commits the university to support First Amendment rights to free speech.

Despite the heated reactions to Toll's decision, the proposed gay-rights amendment at the core of the controversy was considered weak by its advocates.

"Quite frankly, because of the wording, it wouldn't have secured any right for us," said Davis. "We had nothing to do with the wording [drawn up by the campus chancellor] but it was sumbolic." He said his campus group is drafting a stronger amendament to propose to the student-faculty Senate. Action by that group could still be blocked by Toll.

The amendment that Toll vetoed would have added "any constitutionally protected expression of sexual preference" tothe list of acts and beliefs protected from discrimination by the code.

The Maryland Constitution does not protect homosexuality, and certain state laws governing soldomy and other sexual acts outlaw homosexual practices. s

The toothless nature of the amendment was one of the reasons Toll gave in a long memo to campus Chancellor Robert L. Gluckstern, who had endorsed the addition of the clause in May 1979 and sent the matter to Toll, his superior, for final approval.

In its original form, the amendment was considered stronger. It would have provided for protection of student rights regardless of "sexual orientation," putting homosexuals on a par with heterosexuals. Although it passed the student-faculty Senate in that form, the chancellor decided to water it down before sending it on to Toll.

Toll took no action until Wednesday, 19 months later. The university president rarely overrules one of his campus chancellors, state officials said. p

Citing consultations with the state board of regents and the state attorney general's office. Toll wrote in his memo that the university was powerless to guarantee gay rights unitl state or local laws do so.

Gluckstern bowed to Toll's ruling, but released a memo saying that the university supports the First Amendment rights of homosexuals.

"What we're saying is that the act is prohibited, the speech is not," a spokesman said.

The gay rights amendment, a campus issue for more than five years, became the center of heated controversy during the 19 months that is spent onToll's desk. It attracted wide campus support, getting endorsements from candidiates for student government offices, and prompted emotional exchanges in the letters to the editor column of the student paper, The Diamond Back.

The amendment drew criticism from some powerful state officials, including De. John R. Hargreaves (D-Caroline) chairman of the House Appropriations Committee, which controls the size of the university's budget. aHargreaves said publicly last year, "I don't think there's any place for that kind of a clause." He added yesterday that he feels most of rural Maryland shares his view.

Citing Hargreaves comments, gay activists accused Toll yesterday of bowing to political pressure to protect the school's budget in a year of tightening finances in Maryland. A campus administration spokesman countered: "Some people may not believe it, but we don't really get that much political push and shove here."

Amendments such as the one vetoed by Toll -- and some that are considerably stronger -- are part of nondiscrimination codes at at least 20 American colleges and universities, according to a spokesman for the National Gay Task Force in New York. Among them are Cornell, Harvard, UCLA, the University of Pennsylvania, the University of Michigan, Rutgers, Haverford College in Pennsylvania, New York University and Oberlin College in Ohio.