When the national anthem started playing during a ceremony this year at Tachikawa Daini Junior High School, Kimiko Nezu, a soft-spoken but resolute home economics teacher, refused to stand and kept her mouth shut while others sang around her.

Nezu, a self-described pacifist, said she has done the same thing ever since the parliament designated the World War II hymn "Kimigayo" as the national anthem in 1999. She said she opposes the song because it was the same one sung as the Imperial Army set forth from Japan calling for an "eternal reign" of the emperor.

Previously, her protest brought nothing more than harsh stares from some students and parents. But the Tokyo school board issued an order in October 2003 that the anthem must be respected. Since then, Nezu, 54, has been punished by frequent transfers from one school to another and with temporary salary cuts. And in May, shortly after the incident at Tachikawa, she was suspended for a month. Officials warned that another offense could lead to her dismissal after 34 years of teaching.

The school board reaction was part of an effort by Tokyo and other school districts to enforce a new sense of pride in being Japanese. The measures were strongly backed by Shintaro Ishihara, the governor of Tokyo and an outspoken nationalist, as a way to strengthen classroom patriotism.

The school board's mandatory rule has had a visible effect. At graduation ceremonies in 2004, 198 teachers refused to stand. After a series of fines and disciplinary actions, Nezu and nine other teachers were the only protesters this year.

"They are trying to weed us out of society," Nezu said. "The pacifists, the people who oppose nationalism in Japan. We are gradually being silenced."

The school board action is at the center of criticism throughout East Asia about rising Japanese nationalism. But it is also part of an ideological battle over the role of patriotism in Japan, where people are especially concerned about how the young will view their country.

"It is time our children learned to be proud of Japan," said Hitomi Nakayama, 48, a council member in Tokyo's Tachikawa City district. Nakayama, whose son has just graduated from the junior high school, has called for an investigation of Nezu's teaching practices.

"There is nothing wrong with paying respect to our flag and our anthem or in taking pride in our nation and heritage," Nakayma said. "Most of the world enjoys that right. Why shouldn't we?"

Displays of overt patriotism were controversial in Japan in the decades after World War II. But public discourse has been changing. When the parliament adopted the "Kimigayo" hymn, it also declared the traditional Japanese sun flag, a red disk in a field of white, as the official flag. Until then, the country did not have a legally recognized national flag or anthem.

As Japan has observed the 60th anniversary of the end of World War II in the Pacific this month, nationalist political leaders have gained prominence advocating a stronger role for Japan in the world. In the aftermath of Japan's economic recession in the 1990s, there is a growing popular notion that the country deserves clout commensurate with its position as the world's second-largest economy.

Citing the threat of international terrorism and concerns that North Korea may have nuclear weapons, members of the governing Liberal Democratic Party say part of updating the country's international profile involves military preparedness. They advocate a change in Japan's constitution, which was drafted by the United States after World War II and removed Japan's right to maintain a military or wage war. The change would allow the country to define its Self-Defense Forces as Japan's armed forces.

But Japan's dwindling pacifists worry not only about the surge in nationalism but also a trend toward revisionist history that glorifies militarism.

On Aug. 15, the anniversary of Japan's surrender in World War II, a record 205,000 worshipers turned out at Tokyo's Yasukuni Shrine -- a nationalist symbol that honors Japan's fallen warriors, including convicted World War II criminals. That same weekend, the Mainichi newspaper here released a poll of 1,058 Japanese showing that only 43 percent thought the nation's actions during World War II were "clearly wrong," while the rest said the war had been unavoidable or were unsure. The comparable response was even lower among younger Japanese -- 36 percent of 20- to 30-year-olds participating in the poll considered Japan's role in World War II as clearly wrong.

Such views, experts said, are based in part on education, as younger Japanese have been exposed to gradually lower doses of war guilt. Unlike Germany, which still strongly confronts the Holocaust in history classes, Japan's most frequently used history book for junior high schools emphasizes ancient history, spending 15 of 207 pages on wartime aggression and only one paragraph on the Tokyo trials that condemned the nation's war criminals.

Updated textbooks approved by the Education Ministry this year sparked outrage in China and South Korea for glossing over Japanese war crimes. The books dedicate 24 pages to the war period but whitewash the Japanese role and call for a "reconsideration" of the Tokyo trials. Sharp criticism from abroad has seemed to have had no effect. Before anti-Japanese street riots erupted in Beijing, Shanghai and Seoul in April, only 14 Japanese schools had adopted the revisionist books. Since then, at least 30 more have approved their use for the coming school year.

"A long time has passed and apologies and compensation have been given," said Yuko Tojo, 66, the granddaughter of Gen. Hideki Tojo, Japan's wartime prime minister. "Our children should now be allowed to honor their country."

As the cherry blossoms bloomed in April outside Tachikawa junior high in west Tokyo, Nezu prepared to make her stand against the school board by simply sitting down. She said she had been directly warned by her superiors about the consequences of violating the new regulations about classroom patriotism.

Nezu said she developed her views on nationalism after graduating from high school, when she read graphically detailed accounts about Japanese atrocities in Korea and China -- in books she had never seen at school. She confronted her father on the issue, she said. He had been a member of the Imperial Army during Japan's campaigns in China but had never spoken in detail about the war with his children, she said. "You were part of it, too, weren't you?" she recalled asking him, saying he fell silent and refused to answer when his teenage daughter looked him in the eye.

Clearly, Nezu has influenced students. Natsuki Tajima, 19, who was in Nezu's 1999-2000 class at Ishikawa Junior High, said many of her classmates had refused to stand and sing the national anthem after hearing Nezu's arguments. The school board transferred Nezu from Ishikawa in 2000, and her influence at the school faded, Tajima said. "I was one of the only ones who continued to sit down by the time I graduated," she said.

Authorities were eager to counteract such influences. "History education is meant to make children love their nation and national land, learn their predecessors' achievements and mistakes, and to think about ways to further advance their accomplishments," Ishihara, the governor, wrote in a 1997 book that discussed developing pride in Japan.

Nezu's struggle has become national news; she has been both demonized by conservatives and supported by pacifist groups and the teachers union. Tokyo school board officials dismiss the contention that they are trampling her rights.

But Nezu and the school board authorities have remained at odds. She was transferred four times in five years, often to schools two hours from her home. Nezu has fought back by filing lawsuits against the moves; she has lost one, and at least four other cases are pending. In addition to the salary cuts and the transfers, Nezu is now allowed to teach only when another teacher is present. But she said she is adamant about her stance.

"I feel as if freedom to question authority is being quashed just as it was during the war years," she said in a quiet, studied voice. "But I will never stand for that song, the same one that played when we were invading Asia. Never."

Special correspondent Sachiko Sakamaki contributed to this report.

A Japanese national flag flutters in the wind at Tokyo's Yasukuni Shrine, which honors Japan's fallen warriors, including convicted World War II criminals. Kimiko Nezu, in front of her school, protests the national flag and anthem. She was suspended for not singing the anthem during a school ceremony.