With the sensational murder trial of former San Francisco Supervisor Dan White expected to end in a matter of days, a sense of relief is sweeping through this city that another chapter in San Francisco's often violent history is finally coming to a close.

But for the city's large community of homosexuals, a legacy remains from last November's assasination of Mayor George Moscone and gay Supervisor Harvey Milk. There has been a dramatic erosion of their political power and anti-homosexual violence has increased to a level unparalleled in San Francisco's recent history.

In the six months since the murders, the homosexual community has been rocked by beatings, knifings, clubbings and shootings of gays. Incidents of physical harassment and verbal abuse have become daily events. Painted slogans of "Free Dan White" and "Kill All Queers" have appeared on wall bordering the city's predominantly gay Castro Street area.

"I've never seen such vicious graffiti against gay people as I have in the past few months," says Lloyd Cowan, gay community liaison for the San Francisco Human Rights Commission. "It's related to the Dan White Trial-he has become a hero to some people."

Aggravating the situation has been what gay leaders consider indifference on the part of local political leaders and the police department to anti-gay violence. Even worse, they charge, is increasing harassment and abuse directed toward homosexuals by the police themselves.

In one of the most controvesial incidents, a group of men, including two off-duty San Francisco police officers, forced their way into Peg's Place, a local lesbian bar, sparking a fight between the female bar owner and one of the police officers.

"The fact is the police are mistreating gay people in a way that has not happened in San Francisco in many years," contends San Francisco Superverisor Harry Britt, a gay who replaced Milk on the city's Board of Supervisors. "We are talking about dozens of incidents of harassment."

Behind the rise in anti-homosexual violence lies a complex of factors. Gay violence lies a complex of factors. Gay leaders fear that recruitment of gays into the police department, other job gains for gays, and an influx of homosexuals into the city's already tight housing market produced resentment that sparked the recent rash of violence.

"The gay community has become very visible and is perceived as a threat by some small portion of the San Francisco populace," Britt says. "There's a backlash."

Some gay leaders also charge that recent press portrayals of Dan White as a highly principled and idealistic man whose mind snapped in the face of widespread corruption in San Francisco has produced sympathy for White's actions.

"He is being lionized as an all-American boy, all the old symbolic connections - sports, motherhood, a family man," says Paul Lorch, managing editor of the Bay Area Reporter, the city's largest gay newspaper. "There is definite, definite support for what he did. The way it's viewed, the cesspool was so bad that it triggered the only legitimate response. It's sort of open season on gays."

Lorch and other leaders in the homosexual community also lay much of the blame for the violence on the shoulders of Mayor Dianne Feinstein, who they charge has failed to continue the strong pro-gay stance of the Moscone administration.

Feinstein has come under fire for allegedly delaying appointment of Milk's successor, failing to react quickly to the Peg's Place incident and most recently refusing to honor a promise made by Moscone to appoint a gay to the San Francisco Police Commission. Even worse, the gays feel, has been the new mayor's much publicized campaign to "clean up the city," with a crackdown on sex parlors, prostitution and crime in San Francisco.

That policy, according to gay leaders, has led to police action against gay clubs in the city's Tenderloin area, increasing harassment of homosexual youths on the city's streets and a sense among some police officers that, under Feinstein, "fag-bashing" will not be dealt with sternly.

Feinstein, however, recently warned that "she will not tolerate any harassment of gays or anybody else," according to her press secretary, Mel Wax.

Compounding their loss of influence in the mayor's office is the grim prospect that the gays may lose the one seat they now hold on the San Francisco Board of Supervisors. While Harvey Milk was considered a strong candidate for re-election next fall, his replacement, Harry Britt, faces a stiff challenge from two liberal, but non-gay candidates.

The gays were quick to point out they are not about to vanish as a political presence in San Francisco. The city's homosexual community is 100,000 strong by modest estimates (constituting more than 15 percent of the populace), and remains a powerful voting bloc in next November's elections.