NEW YORK -- A gang of whites attacked two black brothers in the Bensonhurst section of Brooklyn, shouting "This is our Howard Beach!" Four blacks beat up a Polish refugee cabdriver in Manhattan. A black man in Queens died in a hail of police gunfire. A black woman from the Bronx died after six days in police custody.

Racial tensions have been running high here since a Queens jury in late December convicted three white teen-agers of manslaughter in the 1986 death of a black man in Howard Beach. Black demonstrators will take to the streets today for the third time in recent weeks to protest what they see as a pattern of racial injustice in a series of killings and arrests stretching over a decade.

The demonstration at City Hall is designed both to mark the Rev. Martin Luther King Jr.'s birthday and to demand that Gov. Mario M. Cuomo (D) appoint a permanent special prosecutor for race-related violence.

"New York City is the most polarized and the most racist city in America," said the Rev. Lawrence Lucas, pastor of the Resurrection Catholic Church in Harlem. "Just in the amount of police killings of black folks in questionable circumstances, to put it charitably, we've outstripped Alabama and Mississippi and Georgia." Lucas called the city's police force "a bunch of thugs gone wild."

"I think we're in a situation here where if it was summer, there would be riots," Charles J. Hynes, the special prosecutor in the Howard Beach case, said last week. "It's not just racism; it's widespread, mindless bias."

Blacks have complained both of alleged police brutality and of lax efforts to prosecute assaults that appear to be racially motivated. There were 419 race-related attacks here in the first 11 months of 1987, nearly double the 235 incidents reported in 1986. Police officials say they will start using "decoy teams" to combat racial violence.

In a recent Daily News poll, 42 percent of respondents said anti-black feeling among whites is stronger today than five years ago. In addition, 83 percent of black respondents, and 47 percent of the whites, agreed that New York City police do not treat blacks fairly.

Many blacks here can recite a list of racial incidents, from the 1982 fatal beating of Willie Turks outside an all-night bagel store in Brooklyn to the fatal police shooting of Eleanor Bumpurs, a Bronx grandmother, during a 1985 eviction.

Blacks were also the chief targets of a spate of allegedly false arrests on the subways by transit police officers who were striving to fulfill arrest quotas. Many of the blacks were charged with "jostling" or sexually abusing other passengers, although some of the purported victims said they were unaware of any offense.

The Police Department has been further embarrassed by disclosures that it conducted undercover surveillance of a radical black group and monitored broadcasts of a black-oriented radio station.

Mayor Edward I. Koch (D), who has received relatively high marks from blacks in recent polls, says that despite the recent incidents, "I believe that race relations are better than they were 10 years ago."

Koch drew widespread criticism after the Howard Beach trial for saying that "there are more whites assaulted in this town by blacks than the other way around . . . . When a black is a victim, it's racist, and when a white is a victim, it's robbery."

Koch has also engaged in a war of words with the Rev. Al Sharpton and attorney C. Vernon Mason, both of whom played well-publicized roles in the Howard Beach case. Mason has called Koch a racist and compared him to Eugene (Bull) Connor, the Alabama police chief who turned fire hoses on civil rights protesters in the 1960s.

In a recent slap at the mayor, a group of black Baptist clergymen voted not to invite Koch to their annual memorial service for King, then reversed themselves last week.

The mayor went on the offensive after Lucas, a Roman Catholic priest, said on television that "those who are killing us in our homes, falsely arresting us in the subways, murdering us in the streets, come primarily from the Catholic persuasion." Lucas also likened the city school board to "the Knesset in Israel."

Koch denounced the remarks as "reprehensible" and "anti-Semitic." He said Lucas was part of a group of black "militants" who were "exacerbating racial tensions" as part of a political strategy to oust him in the 1989 mayoral election.

Lucas said last week that his remarks were taken out of context and that he meant to condemn silence by Catholic and Jewish leaders about racism. He said it was Koch who was stirring up racial passions as "a champion" for "redneck New York."

Black leaders are vowing to tie up traffic again as they did on Dec. 21, hours before the Howard Beach verdicts were returned, when hundreds of protesters blocked traffic at the Brooklyn Bridge and halted all subway service to Brooklyn.

State Assemblyman Roger Green, one of 62 people arrested, said the disruptions were "in keeping with a history of civil disobedience" embraced by King. He said that labor unions and civil liberties groups are expected to join today's march.

Moderate black leaders here have taken a more restrained approach. Hazel N. Dukes, president of the state chapter of the NAACP, said she was concentrating on gathering evidence about one of the recent killings.

Asked about the street protests, Dukes said: "We're not above civil disobedience, but we do other things before we get to that point. Sometimes when nothing else seems to work, people are so frustrated they have to explode in some way."

Cuomo opposes the calls for a permanent special prosecutor because, said spokesman Gary Fryer, "we don't believe we have the right to supersede an elected district attorney" except in extenuating circumstances. He said Cuomo has been pushing legislation to boost criminal penalties for bias-related crimes.

Among the recent cases that have fueled black anger here:

Theodore Carelock, 35, a black educator, said he was handcuffed and beaten by four white plainclothes officers in the Bronx Dec. 18. Carelock said the police stopped him after midnight on a street near his home and became angry when he asked to see their identification. Carelock said he was jailed for three days without being allowed to call a lawyer or his wife, and that he felt "totally dehumanized."

Yvonne Smallwood, 28, a Bronx woman, died Dec. 9 while in police custody, six days after being arrested in a dispute over a summons issued to her boyfriend. While police said Smallwood attacked them, her boyfriend and another witness said they saw police kick and beat Smallwood, who died from a blood clot.

Alfred Sanders, 39, a bus cleaner, was killed in Queens Dec. 29 when police fired 11 shots at him. Police said Sanders, who was holding a knife, was lunging at them, but several witnesses said Sanders was not threatening the officers.

Sylvester LaMont, 29, and his brother Steven, 31, were collecting empty soda cans and bottles in Brooklyn on Christmas night when they were attacked by a group of whites with bottles and sticks. Before the attack, the whites shouted: "What's in the cart, niggers? Are you robbing houses?"

Koch told a police graduating class that while cases of racism by police will be dealt with harshly, he believes such misconduct is rare. "We are not going to run for cover and just assume that you're guilty because it's in the interest of some people to create friction between the Police Department and the public at large," he said.