On a crisp autumn evening earlier this month, a black man walked alone through his Gaithersburg neighborhood when two white men stopped and accosted him. They shined a flashlight in his eyes, uttered racial epithets, threatened him with a pocket knife and then burned his elbow with a flare.

In the space of a few hours, about a dozen blacks attacked a 26-year-old white man as he left his apartment in a public housing project less than a mile away. They beat him so severely with their fists and with a 4-foot board that he was left with a broken jaw and a concussion.

Last Sunday, a swastika was painted on the window of a Jewish delicatessen in Wheaton, the latest in a growing number of anti-Semitic incidents in the county that has led the B'nai B'rith Anti-Defamation League to announce that it will appoint a full-time staff member to work on racism in the Washington area.

In another era, or another jurisdiction, these sorts of crimes, which have totaled nearly 150 since the beginning of the year, would have been recorded in police dockets as routine assaults or acts of vandalism. Police investigations seldom would have searched for a racial or religious context.

But nowadays, these and other similar crimes have a different complexion in Montgomery County and region-wide: If race or religion is involved, police automatically list the crimes in a new category of offenses called "hate violence." And under a new Maryland law, crimes such as cross-burnings or painting swastikas are considered felonies instead of misdemeanors, punishable by fines up to $5,000 and up to five years in prison. Montgomery County Council member Michael Gudis has proposed a bill that would double those penalties in the county.

The phenomenon of racially motived vandalism and assaults is not limited to Maryland -- similar incidents have increased markedly across the country in recent years, particularly as the Ku Klux Klan has become more visible.

"You would have to say it's on the increase nationwide," said John Furman, research director for the Southern Poverty Law Center's Klan Watch, based in Montgomery, Ala. "It's a widespread problem, not confined to any one region. There is a definite rise in anti-Semitic activity, and of course the Klan has always been antiblack."

Furman said that while Klan members have been charged in some states with committing the crimes, the vast majority are not committed by card-carrying Klan members.

Montgomery County leads the state of Maryland in the number of recorded "hate violence" incidents, which has caused some soul-searching among the county's traditionally liberal elite. The rise of hate incidents in the county -- from 25 in 1980 to about 100 last year to close to 150 so far this year -- also became a heated campaign topic this year, when various candidates for county executive, Luiz R. Simmons, Wade Dunn, and later Joseph McGrath, took turns blasting the incumbent county executive for presiding over the increase.

But County Executive Charles W. Gilchrist and police chief Bernard D. Crooke contend the number of crimes are not up, only that more people are willing to report when they are victimized. They argue that the increase in reports proves the effectiveness of the county's program.

The county has attacked the problem in several ways: A special police unit, led by Sgt. Richard Williams, investigates incidents and reports them to the county Human Relations Committee, which has a group called Network of Neighbors that provides support to victims. The county school system now includes sections on extremist groups in the standard social studies curriculum. Gilchrist has appointed a commission to coordinate the county's responses to incidents county-wide. Police must report county incidents to the state highway patrol, which monitors racially and anti-Semitic motivated crime state-wide.

Police say that although the hate cases are not the work of organized extremist groups, there is a correlation between news accounts of hate group activities -- such as a well-publicized Ku Klux Klan rally in Lakewood Park on Nov. 6 that attracted only 23 robed Klan members and about 140 reporters -- and the recent spate of hate activity.

"There is the political problem in publicizing the county's efforts to curb hate violence and a fear of creating an overreaction," says Sgt. Williams. "But we also are concerned that on the part of some victims there is a tendency toward under-reaction."

Furman calls it a "copycat problem. If one gets reported, you're liable to have five more in the next couple of weeks. It's similar to the Tylenol thing."

Since the first day of this month -- a day marked by the desecration of the Shaare Tefila synagogue in Silver Spring, a sophisticated crime that included painting anti-Semitic slogans in German and large swastikas on the temple walls -- county police have received reports of 12 racially and anti-Semitic motivated incidents. Although five suspects have been arrested in the synagogue case, few other arrests have been made.

The crimes, which are targeted almost exclusively and evenly towards blacks and Jews, run the gamut and are spread throughout the county: In this month alone, swastikas have been painted on cars, on a county building, on a Jewish delicatessen; eggs and beer bottles were thrown at several Jewish residences; a 17-year-old black woman was harassed by a group of white men in a car; a black man was assaulted by two whites making threats about the Ku Klux Klan; a black man struck a white man with a stick while waiting at a bus stop.

The apparent increase in hate violence throughout the county is a phenomenon that few officials profess to understand. Most say only that there is a correlation between the incidents and changing economic and social conditions, crises in the Middle East, and media attention on extremist groups.

"It is very difficult to get a grip on any kind of trend," said Joan Weiss, staff director for the community relations division of the county's human relations commission. "Part of it may be that scape-goating is always prevalent during hard economic times."

Most troubling to county officials and police is a sense that the preponderance of these crimes may reflect a growing mood of intolerance in a once homogeneous county that is now undergoing dramatic economic and social change. Between 1970 and 1980, for example, the black population of the county more than doubled, from 4.1 percent to 8.7 percent, to about 55,000 people. In that same decade, tens of thousands of foreigners from less developed countries -- Southeast Asia, the Caribbean and Central America -- moved into Montgomery, whose population now is about one-sixth Jewish and one-fifth blacks, Asians and Hispanics. In 1960, the county's minority population was 3 percent.

Roscoe R. Nix, president of the county NAACP, said there is a growing perception among whites that blacks and other minorities have benefited from economic opportunities' at their expense. And he also blames the Reagan administration for fostering discriminatory policies that he claims take the onus off racial and religious intolerance and trigger acts of hate violence.

Also troubling to Jewish and minority group leaders is a discovery that many of crimes are committed by juveniles, who prefer cross-burnings and swastika paintings to traditional graffiti, and who apparently have little understanding of the seriousness of their crimes.

(Detective Andy Pecoraro, who is investigating the synagogue defacing, said he is certain that the incident was not the work of an "organized hate group." The five men -- three 18 years old and two 23 -- arrested had been drinking the night of the defacing, he said.)

"That's what frightens me more than anything else," said Nix. "It is frightening that that kind of ignorance can be cultivated so easily when they are so young. We are more in danger because we are producing young people likely to be entrenched in this way of thinking as adults."

Weiss of the human relations commission added: "The emotional impact on the victim has not been taken as seriously as it should have been. For someone who has lost their parents in a Nazi gas chamber, a painted swastika is not like paint on a building. And for a black person whose ancestors grew up with the oppressiveness of the Old South, a cross-burning is not merely two pieces of wood on fire. You're talking about a whole history of discrimination."

Ironically, the upsurge in crimes motivated by racial and religious bigotry comes despite new signs that Maryland is one of the most tolerant states in the union. A survey released this month that was conducted for Gov. Harry Hughes' task force on hate violence shows that most Marylanders disapprove of racial and religious incidents and favor legal action as a response.