TOKYO, JAN. 5 -- Their hands clutching the weapons of combat, their heads wrapped fighter-pilot style with white ribbons bearing the words "inevitable victory," the warriors lined up by the thousands this weekend beneath the green fluted roofs of the massive Martial Arts Hall on the grounds of the Imperial Palace.

They were the elite corps of finalists assembled from every corner of Japan for the annual New Year's competition in the most gentle of the traditional military arts -- not karate, not judo, not aikido, but shodo: the art of brush-writing.

Since this island nation first imported the ideographic character alphabet from China in the 7th century, the artful writing of characters with a thick brush dipped in handmade ink has been one of the central elements of the Japanese aesthetic.

Even today, when microchip-controlled word processors can instantly print perfect renditions of any of thousands of characters, every Japanese student still studies shodo at school, millions of adults take cram courses after work, and the yearly competition here draws intense national attention.

The yen for shodo nicely illustrates the abiding spirit of this thoroughly modern ancient country, where people want to reach for the future with one hand while keeping the other firmly gripped on the traditions of the distant past.

Accordingly, the picture played out this morning -- thousands of people, brushes clutched in hand, writing their New Year's scrolls in the main auditorium of the Martial Arts Hall -- has become one of the classic images of modern Japan, a scene that captures the soul of the country as much as the famous photographs of the bullet train streaking past Mount Fuji or women in bright kimonos jammed in with businessmen in drab suits on the subway at rush hour.

Like many things that today's Japan treasures, the national shodo competition traces back to samurai days.

Constant refinement of one's skill at brush-writing was a key tenet of the Bushido, the "Code of the Warrior" that served as a samurai's moral rule book.

"All the great shoguns were calligraphers," said Yoshio Mifuji, of the Japan Martial Arts Association. "They had to be swordsmen and generals, of course, but that wasn't enough to be a complete person." The Warrior's Code emphasized the concept of bunburyodo, an equivalent of the Latin phrase mens sana in corpore sano, meaning "a sound mind in a sound body."

But the great calligraphers insist that brush-writing is not simply a matter of intellect or artistic skill.

"Shodo is a path," explained master calligrapher Makiko Yoshida. "It's a path leading you toward inner peace. The important thing when you hold the brush is not so much what you write on the paper, but what you achieve spiritually in doing the writing."

Still, many of the nervous, fidgety contestants holding their brushes today in the Martial Arts Hall seemed more worried about the seasonal competition than the spiritual consolation they might draw from writing.

From tens of thousands of applicants, the Martial Arts Association had picked 7,700 finalists to write four-foot-long scrolls. A team of 40 judges will spend the next two weeks perusing all the entries, checking for calligraphic basics -- the squaring off of a corner, the proper flare of the ink at the end of a stroke -- and for the overall feeling and balance of each scroll.

Competitors ranged in age from 7 to 75 or so, but this was not an age-group competition. In fact, the winner of the prime minister's grand prize last year, and ipso facto the premier shodo master of all Japan, was an 11-year-old fifth-grader named Atsuko Kamatta from the Tokyo suburb of Ohme.

"I was nervous, yeah," recalled Kamatta, who was back again this year. "But I always enjoy shodo. I like practicing, writing the same characters over and over again. I practiced my scroll, like, a thousand times before the competition. When I'm writing, I can forget everything else and focus all my feelings on that one piece of paper."

The brush-writers stroking characters today were asked to bring their own brushes, ink, ink-holders and felt mats to absorb the excess ink. They were each given two 52-inch-long sheets of rice paper, so that they could write twice and then choose the better of the two to be the official entry.

The texts were assigned beforehand, drawn from phrases and poems traditionally used for the rite of kakizome, or "first writing" of the year.

First-graders, who have not yet learned many characters, wrote the single word "sheep," since 1990 is the Year of the Sheep in the Chinese zodiac.

Later grades advanced to somewhat larger tasks -- such as writing "compassion" and "the joy of friendship." College students and adults had to write full poems, such as "The new spring -- the wind raises its voice in the bamboo grove outside my door."

Masumi Mitsubashi, a 10-year-old from Chiba prefecture, stood at her designated rectangle on the floor wearing a striped sweater that bore the English words "Pretty Animal."

When the judges beat the big taiko drum to signal the start of the competition, she calmly dipped her big brush in a pool of black ink and stroked out her assigned phrase, "the life force," in rapid progression, without a pause.

She carefully blotted the page to take up excess ink and then took out a much smaller brush to write her name and grade along the side of the characters. Finished well before the 20-minute limit, she stood around casually waiting for the drumbeat that marked the end of the contest.

Observing all this from the balcony was a much less casual person -- her mother.

"Oh, she's writing too fast, I think," said a nervous Hiroko Mitsubashi. "It's not as good as she could do. She practiced about 300 times, but it probably wasn't enough."

Still, Hiroko Mitsubashi could not conceal the pride she felt watching her contribution to Japan's future carrying on the aesthetic tradition of Japan's long past.

"What she did," the mother said, "out there with her brush, that was really the heart of Japan."