As salty winds gusted off Tokyo Bay, a crack unit of Japanese commandos ascended the starboard ladder of a ship in a simulated hunt for weapons of mass destruction. They secured and patted down the crew, then searched the docked vessel until they uncovered its hidden cargo -- a mock stash of sarin gas.

The training exercise late last month was all for the cameras. Japan, along with Australia, France and the United States, was showcasing its willingness to prevent the transit of weapons by terrorists and renegade states, particularly North Korea. But for Japan, a country that since World War II has eschewed any impression as an aggressor, the decision to take a leading role in a high-profile military exercise marked a rare display of force. It underscored another mission: to redefine this nation as more than just an economic power.

Seeking a more assertive role on the world stage, the Japanese government is now in the midst of a campaign to win a permanent seat on the U.N. Security Council and transform its Self-Defense Forces into a full military. Key to the changes is a push by the ruling Liberal Democratic Party to alter the country's pacifist constitution, which renounces war. For the last nine months, 600 noncombat Japanese troops have been stationed in Iraq, the country's most dangerous military-related operation since World War II.

At the same time, however, the government is struggling to strike a balance between its new ambition and deep public rejection of the nation's militaristic past. The result has been a delicate, even painful transition away from pacifism. More telling, for instance, than the well-equipped troops running through the maritime interdiction exercises last month were the elements of those drills that were unspoken and unseen.

To limit the impression of aggression, the government insisted that no weapons -- unloaded, fake or otherwise -- be carried by those participating in the drills. It also refused to officially acknowledge that any one nation was the target of the exercises, though U.S. officials have openly stated that the training mission was aimed at sending a message to North Korea.

In the simulated interdiction, officials insisted on having one of their own destroyers flying the Japanese flag masquerade as the targeted ship to avoid any image of confrontation with a foreign power. Even then, citing constitutional limits on the armed forces, the captain of the rogue ship had to give verbal permission before the boarding party could set foot on deck.

"Japan has been changing its role in response to new threats and our desire to contribute more to the stability of the world," said Masashi Nishihara, president of National Defense Academy, the country's elite armed forces training school. "But it is a slow and gradual effort. It may sometimes seem like a contradiction, but this is the way it has to be."

In their own fashion, however, the armed forces are shedding their low profile, analysts say.

With a defense budget larger than Britain's, Japan is preparing to deploy a 600-foot, 13,500-ton helicopter carrier, the first in its fleet. It is almost twice the size of the current Aegis destroyers.

Spurred by the threat of a nuclear-armed North Korea, Japan is co-developing a multibillion-dollar missile defense shield with the United States, designed to enable it to shoot down ballistic missiles launched by North Korea. The joint project is likely to force a lifting of Japan's long-standing ban on exporting weapons.

A defense panel last month recommended the country's most sweeping national security overhaul in a decade, including the beefing up of its intelligence network, something already underway after Japan launched its first spy satellites into space last year.

The Liberal Democratic Party is pressing to redefine the role of the Self-Defense Forces -- created in 1954 strictly for defense of the home islands. The current Iraq mission, for example, required parliamentary approval of special legislation and a pledge by Prime Minister Junichiro Koizumi that troops would be deployed in a noncombat zone. But next year, debate is expected to begin on changing Article 9 of the post-World War II constitution drafted by the United States during the American occupation, a move that would give Japan far more flexibility to deploy troops overseas.

"There are expectations that Japan play a greater role in dealing with international conflicts," Foreign Minister Nobutaka Machimura said in an interview. "And I believe that Japan must do so."

To that end, officials are now negotiating with the Pentagon a broad redefinition of the U.S.-Japan alliance, in which the United States is now largely responsible for the defense of Japan. On the table, Japanese officials say, is a new concept of "an alliance in global terms" in which the armed forces would work more closely with the U.S. military, both at home and on missions abroad.

"Japan is changing," U.S. Ambassador Howard H. Baker Jr. told a group of foreign reporters in July in terms that he has since used repeatedly. "I think Japan has decided, 'We're a great, big country, we're the second-largest economy in the world, and we probably have the second-largest navy in the Pacific. We want a seat on the Security Council. We want a role to play in the international arena.' I think all those changes are at work and will continue."

The current campaign to boost Japan's international role dates back more than a decade, when its $14 billion financial contribution to the 1991 Persian Gulf War was dismissed as insignificant next to allied nations that had sent troops. But events in recent years -- the increased threat of North Korea, which test-fired a missile over Japan in 1998, the Sept. 11, 2001 attacks and China's rise as a potential challenger to Japan's economic dominance in Asia -- spurred Japanese officials toward quicker change.

However, the desire for diplomatic clout commensurate with Japan's wealth is testing the limits of the public's willingness to assume greater risks. There is no better example that the mission to Iraq, described by officials as evidence that the Japanese are now willing to do more than dole out cash.

But the mission -- which involves medical support, engineering projects and water purification -- has been widely viewed as being of little strategic consequence while remaining enormously unpopular at home. Koizumi is now facing stiff resistance to extending the mission beyond its scheduled expiration on Dec. 14.

Meanwhile, the mission is becoming more dangerous, and at the same time carries the risk of being labeled a failure. Japan's efforts to provide medical aid and rebuild public facilities in the city of Samawah, about 150 miles south of Baghdad, have largely been halted because the security situation in that once relatively tranquil part of southern Iraq has eroded. Japanese officials had periodically limited troop movements outside their camp. But since a rocket-propelled grenade attack on the base a week ago, troops have been ordered to remain inside their protected perimeter at all times, defense officials in Tokyo said.

No Japanese soldier has been injured, or has fired a single shot in combat. The Japanese have spent $750,000 on ad campaigns in Iraq promoting their forces as a humanitarian group independent of ongoing military operations. But the Japanese received a grisly reminder last week of the consequences accompanying even their modest mission in Iraq. Citing the Japanese military presence in Iraq, Islamic radicals kidnapped and beheaded Shosei Koda, 24, a Japanese backpacker, whose body was recovered in Baghdad wrapped in an American flag.

Katsuya Okada, head of the opposition Democratic Party, blamed the military presence in Iraq for Koda's death and said conditions in Iraq are too dangerous. "We strongly demand the withdrawal of" Japanese troops, he said.

But sources close to Koizumi say the prime minister is likely to extend the Iraq mission, concerned that a withdrawal would be seen as giving in to the radicals who killed Koda, and as a step back inside Japan's shell.

"The mission is not completed," a senior Japanese official said, on condition of anonymity. "We would be sending the wrong massage in many respects if we ended it now."

Special correspondent Sachiko Sakamaki contributed to this report.

Japanese commandos board a ship in a maritime interdiction exercise. Participation in the exercise underscored Japan's desire to redefine itself as more than an economic power.