The tragedy was rooted in an historic evil and the darker side of modern life in this famous city of picture-book palaces and temples. Michie Nakamura, 31, and a factory hand, stood trial for killing her lover of six years after he refused to marry her. The dead man's family had forced him to end the romance because Nakamura is one of Kyoto's 25,000 "outcasts" and therefore subject to a peculiar and implacable form of discrimination.

The Burakumin, or "village people," are physically and culturally indistinguishable from other Japanese. Yet, for centuries, they have been stigmatized and segregated as a genetically flawed race, sub-humans, not fit to mix or marry in respectable society.

In a celebrated 19th Century murder trial, the judge said he could not have a man executed for killing a Buraku without first having six more Buraku put to death. The life of an "ordinary Japanese was worth seven Buraku, " the judge explained.

The Nakamura case proved that the irrational prejudice is still deeply held. But the verdict showed that a militant Buraku civil rights movement is breaking down the invisible barriers and gradually ending the misery.

The judge threw out the murder charge against Nakamura earlier this year and freed her with a two-year suspended sentence for the lesser crime of manslaughter. The killing, the judge ruled, occurred against a background of unjust discrimination for which the whole nation bore responsibility.

"This system is a disgrace to us all," says Eichii Watanabe, deputy director of the government's Buraku aid program. "We must end it and achieve equality and freedom for everybody."

Since 1969, more than $2 billion in public funds have been pumped into the Buraku slums, belated reparations for generations of neglect. More important, however, is the outburst of Buraku anger which forced the pace of change.

The Buraku experience closely parallels that of the blacks in America. The outcasts used to suffer silently and hope for unobtrusive assimilation. Now, they demand equality on their terms with a stridency which has intimidated the Japanese media and local authorities. Urban renewal is transforming the age-old ghettos. In the new schools, teachers are trying to break the vicious cycle of inferiority feelings and apathy which in the past led Buraku children into crime, drugs and prostitution.

"We have to change the minds of our people," a Buraku leader explained. "We teach the children Buraku history and give them the spirit to fight discrimination." Millions of Untouchables

THERE ARE up to 3 million Burakumin in Japan and they live in about 6,000 rural and urban enclaves, according to movement officials. Sanjo, an area of Kyoto between a temple and the geisha "Flower Town," has been a Buraku ghetto for at least 500 years. Public housing projects stand alongside rows of tight-packed huts and rusting tin shacks. Dark alleys, far too narrow for any firetruck, weave through the rickety maze to communal kitchens and lavatories. Glimpsed through open doors, they are clean but cramped, shabby quarters well below the usual standards in Japan.

Of the 400 families in Sanjo, over half are rehoused in low-rent apartments. The redevelopment stays inside the Buraku neighborhood, an interim step, community leaders say, to raise living standards and prepare the underprivileged outcasts for entry to the mainstream of Japanese life.

It will take time. Outsiders use the new, subsidized community bath-house in Sanjo - in the pre-dawn hours when they can't be seen and don't have to share the water with the Burakumin.

Once condemned as intellectually dull, the outcasts are demonstrating that their disadvantages are of environmental rather than genetic origin. In Sanjo, the children study after school in the disciplined quietness of a $100,000 center. In 1962, only 30 per cent of Buraku children went to high school. By 1975, it was up to 74 per cent - but still well short of the national average, 92 per cent.

Near the children's building, a group of elderly women lunch contentedly in an elegant welfare center. "This is heaven," a 71-year-old grandmother beamed. "It's the result of our movement."

"We take care of the old people because they have suffered the most," organizer Akio Komai said."We take special care of the children because they are the future." The Roots of Prejudice

THE BURAKUMIN originated out of social necessity and religious taboos against the killing of animals. The indigenous Shinto faith and imported Buddism both abhorred death and uncleanliness. Yet the tasks of animal slaughter and execution of criminals had to be performed. The people who gravitated to these despised occupations were shunned and literally cast out from ordinary society.

The Shoguns, the military dictators who unified and organized Japan, ranked the population into four classes - the Samurai, farmers, artisans, and trades - and made the Burakumin non-citizens in their own country. In 1871, the Emperor Meiji officially ended the caste and class system, but did nothing to bring social justice to the outcasts.

In the old days, the "ordinary" Japanese had no difficulty in recognizing, and avoiding, the Burakumin. Their unwashed bodies stank, their faces were begrimed, their clothes grubby and ragged.

Education ended that simple basis for discrimination and now the Burakumin look and dress like everyone else. The only certain way to identify one is to match his family's home address with a Buraku settlement.

But the consequences of a particularly pernicious brand of racism remain.

Almost a third of the men in Sanjo are out of work or only partially employed. In the Kyoto of 1,000 years ago they had dirty, menial work as sweepers, slaughterers and leather-workers. Today, many work on garbage trucks, and the sidewalk shoe-menders seen everywhere in Japan are almost always Buraku - unable, a Buraku leader explained, to get better-paid jobs.

The pain was written clearly on the faces of 10 middle-aged Sanjo Burakumin leaders seated round a table. A 43-year-old youth worker with heavy bags under his eyes and tousled hair told how half the people of his generation were illiterate. He came back from heroin addiction and gangsterism for a cause "I will fight for to my death."

In contrast to the expressionless faces and circuitous speech often met in Japan, the Burakumin were striking in their emotion and the rough-spoken eloquence in their tales of injustice. They talked about the humiliations of the past with anger and about the future with unanimous hope.

One man remembered how a wartime lottery for shoes was always fixed so Buraku children lost. The worst moment of another man's life was having his son's birth certificate tossed back in his face because he was unable to write.

The outcasts are specially sensitive to their plight because they are excluded from the warm, tight-knit sociability of everyday life in Japan. In a supposedly classless nation where education and employment determine status, the Burakumin are constantly reminded of their rejection. Kiyoshi Yoshida, 41, has struggled for four years to find acceptance outside the Sanjo enclave. Now he wants to come back: "Two weeks ago the kids said to my 10-year-old daughter, 'You stink, you smell.' I felt so bad inside. . ."

The prejudice against intermarriage with a Buraku family produces heart-rending situations which quite frequently end with a suicide. In employment, qualified Buraku candidates say they are turned down by the major companies with flimsy excuses. The closely ordered nature of Japan, where everyone is registered, makes it difficult for an outcast to escape his past. When companies were prevented by law from seeking information which would identify Burakumin among their job applicants, they turned to other methods. At least 103 companies have admitted buying copies of a secret Buraku Gazetteer.

In Japanese, the word yottsu means four, and the word is associated with four-legged beasts. Among ordinary Japanese, yottsu is accepted as an oblique way of referring to the Burakumin. A hand silently held up with four fingers extended has the same meaning. Affirmative Action

BURAKU leaders would like to see a U.S.-style affirmative action program to accelerate Buraku integration. Educational handicaps limit progress to equality. For instance, there are no Burakumin among the 11 civil servants in the aid program headquarters. "Entry is by examination. There is no discrimination, it just happens to be this way," Deputy Director Watanabe explained.

The national organizer of the Buraku Liberation League (BLL) is Akio Komai, 36, a self-assured man of intelligence and quiet strength. Brought up from primary school to fight discrimination, he is caught up in a controversy which slices bitterly through his own family as it does the whole Buraku movement.

For every outcast ready to march for equality with the militant league, there is another concealing his Buraku origin and trying to melt into society who fears the agitation will unmask him. Some of Komai's relatives who concealed their outcast identity to get white-collar jobs and middle-class affluence are highly critical of his activism: "They believe that if we don't say these things, discrimination will disappear naturally."

"As long as this poor life exists for some," he contends, "there is no liberation for anyone."

Komai contends that the underground Buraku live in fear - three of his women cousins have been divorced after discovery - and allow the government to minimize the problem. While the League gives the Buraku population of Japan as 3 million, the government, which counts only the admitted Buraku, uses the figure of 1.1 million. The government says there are no Buraku in Tokyo. There are 400,000 of them, says Komai, clinging to hard lives in the lower echelons of society.