When Sandy McDonald the assistant principal of Wheaton High School, fired a gun into a crowd of students more than a week ago, he was reacting to years of racial harassment and frustration over his -- and the police's -- inability to stop that harassment.

Ever since McDonald came to Wheaton High School from North Carolina in 1972, he had endured racial taunts and vandalism to his property.

Each time his property was vandalized or he was sent a message from the Ku Klux Klan , he called the police. Each time, police visited him at his home or the school, dutifully wrote a report, took it back to headquarters and filed it. Each time, that was the last McDonald heard from police until the next instance of harrassment, when police again would visit him and write yet another report. Police never arrested anyone for harassing McDonald or vandalizing his property.

And so it was with some bitterness that, soon after the shooting, McDonald told a reporter, "Nobody cares about us."

A group of black leaders in Montgomery County believes that police at least could have spent more time in McDonald's neighborhood to ward off such harassment.

"We feel outrage at the mean and vicous treatment accorded the McDonald family over the years," a spokesman for the group said. "Police have not provided adequate police protection from this well documented humiliation and abuse."

The group, which indludes members of the NAACP, black ministers and members of Alpha Phi Alpha, the black social service fraternity, has taken up a collection of $600 for McDonald's legal defense. McDonald was arrested and charged with assault with intent to murder for shooting into a crowd of students on Oct. 24. He has been released on $5,000 bail and is on leave from his job, with pay, pending the outcome of an investigation into the incident by school authorities.

Convinced that the police did not care about the harassment he was enduring, McDonald took matters into his own hands on Oct. 24. He fired his gun at least six times into a crowd of students, inflicting a superficial wound on a teen-ager's arm, police say. The shooting occurred minutes after at least one student had called his daughters "nigger" as they walked home from a pep rally. Although McDonald often had endured racial taunts himself, he could not endure feelings as though he could not protect his children from them.

"I began to feel like I was not providing protection for my family," McDonald said.

It was not the first time that his daughters had been the object of racial taunts. "I get them about three times a week," said Odette, a student a Wheaton High School. "I try to ignore them."

McDonald has denied that the racial taunts prompted him to fire his gun into a crowd of students. He has said that he was firing at men who were shooting at him. Police have found no evidence that anyone was shooting at McDonald, and students who witnessed the incident say they saw no men with guns.

Police say they could not do anything about the harassment and vandalism that McDonald suffered because there were no witnesses to any of the incidents. They also say that Wheaton gets hundreds more vandalism reports than any other police district in the county -- 2,300 in 1979 -- mainly because of the large number of juveniles in the area. They suggest that at least some of the vandalism McDonald suffered was not racially motivated.

These are some of the instances of harassment and vandalism that McDonald says he has suffered since 1972. In almost all the instances, McDonald phoned police, who took a report:

Soon after McDonald arrived at Wheaton High School in 1972, he was beaten at the school by three men who identified themselves as members of the KKK. "They said I was the first nigger vice principal in the school and they wanted to give me a little welcome," McDonald said.

Months later, his car, which was parked outside his house, was painted with the letters KKK in silver. Another night, his car, again parked outside his home, was painted with the letters KKK in white.

About four years ago, three students taped KKK signs throughout Wheaton High School. One of the signs had McDonald's name on it. The students were suspended for one day.

Three years ago, McDonald received a letter in his mailbox at school, signed by the "KKK of Wheaton High School." The letter read, "We the members of the Wheaton High School Ku Klux Klan strongly believe that you should be hanged from the main hall clock. Since our reasons are based on hating niggers like you, and you insist on kissing every other nigger's a-- in this school, we feel this is a just punishment for a pea-headed nigger lover like yourself."

At the time, school authorities and police shrugged the letter off as a "prank."

And then, there are the racial insults that McDonald gets from students at least once a month. They commonly call him "nigger" or say, "The Klan is coming -- you had better hide," according to McDonald.

Blacks make up slightly less than 20 percent of the population of Wheaton High School. Most students at Wheaton are the sons and daughters of middle and lower middle income residents.

Then, there are the other instances of harassment, which are not blatantly racial. On Sept. 22 at 5 a.m., for example, a stack of newspapers were placed against his house and set on fire, and two tires on his Cadillac were slashed.

In 1974, a cinder block was thrown through the front windshield of his car, and in 1975 vandals poured wet cement over his car. Last year, the windows on his Cadillac and van were shot out, and months later eggs were hurled on both his cars and his house.

"No one should have to live with such fear," said McDonald's wife, Bertha.