The toothless great-grandmother sat close to the small oil stove in her sparsely furnished living room, telling tales of the 85 autumns she has passed here in Nibudani, "the valley of the two winds." Huddled around in the soft twilight were several young people of her village, listening attentively.

"Until I was 13," the old woman said, thoughtfully puffing on a cigarette, "I lived the traditional life. Our family lived in a longhouse made of mountain grass and we spent our days hunting deer and rabbits in the forest and gathering plants."

"When it rained," she said in Japanese, which is not the language of her youth, "the adults would stop working and come inside to sit around the fire and tell the old legends. It was a hard life, but there were no telephones and somehow things were cozier and less frustrating."

The storyteller was Teru Nishijima, 86, one of Japan's dwindling race of Ainu, a tribe of hunters and fishermen who may be considered the historical equivalent of native American Indians. Centuries ago, the Ainu roamed the mountains and rivers over large parts of Japan.

Today, after 100 years of poverty, disease and government-imposed policies to assimilate them, the Ainu, according to anthropologists and their own leaders, will almost certainly disappear within a few decades. Along with them will go the stories, like the ones Nishijima tells, of the animal gods of the forests and streams living in harmony with man.

Now, many of the country's 50,000 or so surviving Ainu live in a handful of villages such as Nibudani in southwestern Hokkaido, Japan's second-largest island, which covers an area roughly the size of Virginia.

Here, the wide-open spaces are ringed with forests of white birch and pine and the cattle ranches, broad fields of corn, roadside drive-ins and ramshackle houses fit more the foreign visitor's image of the American West than that of this highly industrialized nation of 117 million people.

In Nibudani, where the main street is lined with shops for Japanese tourists, many of its 600 Ainu inhabitants make their living practicing the traditional arts of woodcarving and weaving. Others drive taxis, work as part-time construction laborers or tend the fields as hired hands.

In recent years, the government has stepped in to ease the plight of the Ainu with offers of subsidies for education and housing and efforts to restore to their original owners the few ancient tribal lands that are not already in the hands of Japanese farmers and ranchers.

But levels of income and schooling among the Ainu remain far below the average in this modern, affluent nation, and they continue to struggle against barriers to jobs, schools and intermarriage with the Japanese.

"Things have gotten better," said Shigeru Kayano, a local folklorist and leader of the Ainu rights movement for the past 30 years, "but, basically, the Japanese don't want to be bothered."

Over a lunch of broiled salmon and salmon eggs, which are part of the traditional Ainu diet, he explained, "the problem today is to save our culture" in the face of declining numbers and the apathy of a younger generation bent on blending in with the Japanese mainstream.

Kayano, whose bushy eyebrows and deeply chiseled Mediterranean features set him apart from the Japanese, said, "There are now only a few old women here who can speak the old language fluently, and once they go there will be no one around who knows the legends" that are the heart of Ainu culture. The Ainu have no written language.

Tales tell of a race of blue-eyed, blond-haired hunters and fishermen who came to Japanese shores in a misty past. According to Japanese anthropologists, however, the Ainu are not descended from prehistoric Caucasian tribes, as was earlier believed, but from a strain of nomadic Mongolians who came to Japan about 7,000 years ago after a centuries-long trek through western Asia.

Early Japanese records tell of fierce battles with bands of bearded warriors from the north a thousand years ago. The first Japanese warlords to earn the title of shogun, which means "barbarian-subduing generalissimo," reputedly did so by driving the Ainu back north to Hokkaido from their ancient capital in central Japan.

In the late 1800s, the two cultures began to clash in earnest when the Japanese government embarked on an ambitious program to lure settlers into Hokkaido. Much of the land was homesteaded off to Japanese farmers from the main island, pushing back Ainu frontiers and forcing them to forsake hunting and fishing for work on Japanese labor gangs.

By the 1930s, tuberculosis epidemics, alcoholism and low wages had resulted in a state of subservience to the Japanese thatKayano described in his own stories.

"My grandfather, Tokkram his Ainu name ," he said, "was forced into slave labor at the age of 12. He wanted to go home so badly that one night he cut his forefinger off with an axe, hoping that would persuade his boss to let him go. Instead, the foreman told him to go put some salt on it." Wives were separated from husbands and "if they were young and pretty, they were forced to become prostitutes for the men from the mainland. After all that, this is what they got for one year's labor," he said, holding up a chipped and faded lacquer-ware sake bowl.

Today, the Ainu remain largely landless, and, in recent years, leaders like Kayano have strongly pressed demands that the Japanese in Hokkaido pay a land-use tax that would help generate more funds to use for housing and schooling their people. Predictably, such claims have made little headway against the interests of flourishing cattle ranchers and farmers here.

"The Ainu never sold or even loaned their land to the Japanese," Kayano said, ". . . and we are not asking them to get out. But it's a shame to uproot a culture that has existed for thousands of years just because we're a small minority."

Frequently appalled by what they view as the depth and breadth of racial strife in American society, the Japanese generally picture their own country as a completely homogenous one free from sticky ethnic problems. In fact, however, there are 665,000 ethnic Koreans in Japan and 53,000 Chinese.

According to official government figures, there are only 25,000 Ainu. But Moriichi Kuzuno, director of the Hokkaido Ainu Association, said that there may be at least twice that number because of a large group of "invisible Ainu" who have managed to pass into Japanese society undetected. They resist coming out of the closet, he said, because they fear breaking up marriages, spoiling chances for promotion in Japan's rigidly hierarchical company system, or even loosing jobs.

Originally, the word ainu meant simply "human beings," but, one Ainu leader explained, after years of discrimination linking it to the image of a reckless band of hard-drinking woodcarvers, "We have come to hate the sound of the word." Now, they generally call themselves utari, or "the friends."

In recent years, offers of government subsidies, Kuzuno said, have encouraged a few of the Ainu hideaways to come forth and claim their heritage. "At least some of our people have got to the point where they can say with pride, 'I am an Ainu.' But it took so many years to reach even this minimum level. The next step is to preserve our culture."

That culture is built around the stories of man living off the land and counting on the aid of the animal gods as long as he did not overstep his bounds, stories passed down through the oral tradition of the fireside chat. The culture has been badly splintered, Kayano said, by the Japanese drive for economic growth and the lure of a modern consumer-oriented society.

In Nibudani, the valley floor was bathed in a buttery light as the late afternoon shadows climbed the green hillsides. Nishijima, whose Ainu name Monteke (pronounced mon-tay-kay) sounds strange to Japanese ears, rocked gently on the edge of her chair and began to chant an epic poem in her ancient tongue. It was about the time when the god of thunder came to earth to woo and wed a beautiful Ainu princess.

"I have lived for so many years," she later said in Japanese, "and I know all the stories told me by my parents and grandparents. Kids today don't know any of them, and, even if I try to teach them, they don't understand."