Nearly three centuries ago, a hot-tempered noble drew his sword against a rude government official and was executed for the offense. His soldiers, disgraced and humiliated, plotted their revenge for nearly two years. They finally stormed the official's well-guarded mansion and triumphantly presented his head at the grave of their deceased lord.

For this assassination, the 47 samurai soldiers were ordered to commit ritual suicide. One by one, from the 15-year-old son of the plot's leader to the 77-year-old eldest assassin, they disemboweled themselves with hara-kiri knives.

With that grim end, the story of the 47 ronin, or masterless samurai, has become one of Japan's most enduring and popular tales, repeated, embellished and revised as a traditional end-of-the-year story.

In December, parades of children dressed in the costumes of the samurai of the Edo period celebrate the story. It is a popular kabuki theater theme, the subject of dozens of books and at least 34 movies. And every year nearly a half-million visitors come to a Buddhist temple in Tokyo to move solemnly among the gray chiseled gravestones of the 47 ronin, wreathed in the smoke of incense.

"They don't come as tourists. They come to worship, to feel the spirit of the ronin," said one of the seven monks, Guisho Kosaka, who has been at the temple for nearly four decades. "This whole story fits the hearts and minds of the Japanese."

The story is not a static old tale. Its successive retellings and reinterpretations have served commentators as a mirror of society, reflecting Japanese values as they changed through the years.

This year, for example, a year-long fictional television series based on the story of the 47 ronin caused debate by presenting the assassination plot as a protest against the central government, not simply an act of supreme loyalty.

"There's a generation gap," said Takayuki Sugano, who produced the historical series for NHK, the national public television network. "The young generation does not understand loyalty or endurance. So for them, we stressed the element of rebellion."

Sugano's change in emphasis seems innocuous by Western standards, but in introspective Japan it touches on sensitive questions: Are Japanese losing the fierce loyalty they once prized? Should they?

A whole generation of Japanese company men today have been shaken by changes in corporate Japan that threaten the tradition of lifetime employment in return for absolute loyalty to one company. Taking the cue, some younger Japanese are forsaking Japanese companies and seeking jobs with foreign firms.

"As a man who works for a company, I understand the loyalty in the story," said Kazuhisa Ookochi, 40, who was visiting the ronin graves this week. "That value still exists in society. But to be honest, it's shaking a bit."

The theme also stirs unsettled questions dating back to World War II. Younger Japanese are uncomfortable with the unquestioning loyalty that took their country into a disastrous war and championed a kamikaze spirit.

"If you think of Japan in World War II, there are a lot of similarities with this story," said Naoki Taniguchi, 48, as he visited the temple graveyard. "There was such loyalty to the emperor then. That is not so true now. I can't think of any situation where I would sacrifice my life for loyalty."

Resting nearby, 67-year-old Nobuko Takahara, from Kobe, was not so certain.

"My daughter and I talk about it when we see the programs on NHK. We say, if we were in that era, would we take part in the plot, or run away?" she said. Were the ronin admirable? "Oh yes," she replied. "It's important not to betray others. Even at the cost of your own life."

In the Ako incident, the real basis of the drama, the samurai suffered public humiliation after their lord, Asano, was executed in 1701. They grimly and quietly plotted their revenge. This endurance of the oppressed and--finally--sacrifice of one's life strikes a chord with Japanese, according to Sugano, the NHK series producer.

"I think it's a good thing that the sense of loyalty is decreasing in the younger generation," said Sugano, 54. "However, it's important in life that there are times when you have to say no."

"A lot of Japanese feel this moral, as presented in the story, is an old-fashioned moral," said Seiji Hirai, a historian and head of the Okura Institute for the Study of Spiritual Character. "But if you look at recent crime, you see a lot of examples where people kill themselves or get involved in crimes to protect the company or organization they belong to. When Japanese are forced into the corner, this deep-rooted value comes to the surface."

The story's ending, so alien to Western notions of shame and disgrace in relation to suicide, is alluring to Japanese.

"It ends by hara-kiri, but it's a success story," said author Eiichi Norimine, whose fictional novel parodying the 47 ronin tale was published last year. "Maybe this is unique to Japanese culture and attitude. We have the word hanatochiru--the falling petals. We appreciate that. The ending is symbolized by that word. For Japanese, it's the perfect way to end a story."

"One of the reasons these stories are popular is that all of them contain self-sacrifice and the beauty of death," Hirai agrees. "Japanese love it when the flowers begin to fall. We love the falling cherry blossoms.

"It's a matter of how you grasp the concept of life," he said. "In Buddhism, it's believed that people are reincarnated, repeating life from death. So the concept is that the current life and death is less important. To have honor is more important."

Special correspondents Shigehiko Togo and Akiko Yamamoto contributed to this report.