Surrounded by books and religious texts, the rabbi leaned his lanky frame back in his chair and mused, "I guess we all have a dream of somehow having an effect on the world, or the community."

Now Rabbi Martin S. Halpern of the Shaare Tefila Synagogue in White Oak can stop dreaming.

Two weeks ago, the Supreme Court ruled unanimously in favor of Halpern's congregation in a case that expanded civil rights protections to ethnic and religious groups throughout the United States.

The tall, professorial rabbi, his soft voice cadenced by a rich New York accent, seems an unlikely candidate for civil rights crusader. At 60, the rabbi had never been involved in any lengthy legal battles, and while active in various religious and interfaith groups in the Washington area, had not been a high-profile activist.

But since eight vandals spray-painted the outside walls of the synagogue and adjoining school room in November 1982 with anti-Semitic slogans, swastikas and other racist symbols, Halpern's 600-family congregation has been at the center of a national debate on the interpretation of the law when religious discrimination is involved.

Standing before the crisply white-washed walls of his synagogue, the rabbi recalled his feelings of shock and resentment when he discovered the desecration.

"When I saw the damage that had been done to the synagogue, my first thought was, how are the members of our congregation who survived the Holocaust going to deal with this?" he said. "I was afraid of the wounds which this would open up."

But after consultation with his congregation and the board of the temple, Halpern convinced them to allow the graffiti to remain, at least for a week or 10 days.

By encouraging local residents to view the damage, Rabbi Halpern said, he felt that he was making an important contribution in alerting the community to the pervasiveness and the endurance of racism.

"Here was a chance for us to raise our voices and protest this act in the strongest possible way," he said in an interview last week.

"The response from the community was overwhelming. We had visits by people of all faiths, calls from around the country. There was even a symbolic cleaning-up effort for which hundreds of people turned out. I had hoped that we could convey to the community our horror, and we did, but it went far beyond that."

Halpern, born and educated in New York, grew up in a religious family with roots in Poland. "My father was eager that I become a rabbi in the footsteps of our European forebears." Halpern explained that during his high-school years, the plight of the Jews in Europe had a great impact on him, and strengthened his commitment to religious works.

He came to Washington in the early 1950s to lead a small Southeast congregation called Beth Israel. In 1956, he joined the fledgling Shaare Tefila Synagogue, then located in Riggs Park. But as that area of Washington began to change, and the younger families began to move out to the suburbs, Shaare Tefila moved to the rapidly growing area of White Oak and Silver Spring.

"Now, after 31 years with the people of Shaare Tefila, we have many old friends here," the rabbi said. "Naturally, we took the desecration of the synagogue very personally."

After the initial pain passed, and the vandals were convicted and sentenced, Halpern and members of the congregation's board felt that more could and should be done.

"We began to talk about instituting a civil suit, not so much to gain compensation for our losses, but because we thought we could in this case set a precedent to offer protection to ethnic groups around the country who are victims of racially or ethnically motivated crimes," Halpern explained.

According to Shirley Altman, a 21-year member of the congregation and the current president, while many people were involved in the protracted battle, "as a spiritual leader, the rabbi had enormous influence in persuading the congregation to go along with the legal battle. People felt that if the rabbi wants this done, then by all means let's do it."

Shaare Tefila filed suit against the vandals under the 1866 Civil Rights Act, which allows for damages to victims of racial discrimination. The congregation argued that while Jews are not considered a racial group, as an ethnic group they are entitled to the same legal protections if they are victimized by those who believe that Jews are a separate and inferior race.

The defense argued that the statute was designed to cover discrimination against blacks and nonwhites as racial groups, and did not apply to ethnic and religious groups.

"It was a very sticky issue," Halpern said. "But we felt that there had to be some redress for ethnic groups who were subject to harassment and persecution by those who viewed them as racially inferior." The Supreme Court agreed, handing down a unanimous decision in favor of the synagogue.

"One of our greatest satisfactions is that now other groups who are much more isolated than we are, who live in communities where they can't garner the kind of public support we had, can appeal directly to a federal statute," Halpern said.