Four Japanese nationalists seized control of the headquarters of the country's most powerful business organization with a sword and guns and held 12 persons hostage for 11 hours before surrendering at 3 a.m. today.

Most of the hostages, some weeping with relief, had been released unharmed in stages during thesiege. The last two emerged with the rightists from the offices of Keidanren (The Federation of Economic Organizations).

During their occupation, the militants issued a manifesto blaming "profit-first policies for the ruin of Japan." The four frequently threatened to commit suicide as hundreds of police surrounded the building.

They wore white headbands emblazoned with a real rising sun, Japan's national emblem. They were armed with a sword, shotgun and pistols, and identified themselves as members of a little-known nationalist movement, The Youth League to Crush the Yalta and Postsdam System.

The said they picked Keidanrem as "the symbol of money-power," and apprently hoped to capture the organization's 80-year-old president, Toshio Doko. When they found Doko was in Osaka yesterday, the group seized the hostages and barricaded themselves into his seventh-floor office suite with desks, tables and planters.

The flamboyant protest against materialism, pollution and the erosion of national values triggered unusual public concern and a nationwide television vigil.

It touched a specially sensitive nerve in Japan because the group stated their admiration for Yukio Mishima, a celebrated novelist and rightist cult figure who committed harikiri, ritual suicide, in 1970 over similar issues. Mishima disembowelled himself after failing to incite soldiers of the self-defense forces to revolt, and his death caused a sensation throughout Japan.

In telephone interviews with reporters, the group's leader, Yoshito Ito, 30, and his three colleagues said they shared Mishima's despair over the future of Japan and hinted they were going to imitate his death. The novelist's wife Yoko Mishima, was called to the scene and talked with the men for several hours. She was credited in early reports with persuading them to give up.

Police said that ito and another of the four were former members of the Shield Society, a private army founded by Mishima in 1968 and disbanded in 1971.

Phamphlets explained the group's title as an attack on the World War II Yalta and Potsdam agreement in which the United States and the allied nations decided to seek the unconditional surrnder of Japan. The peace settlement imposed on Japan had weakened the country, the leaflet said. The activists called for revision of the postwar constitution and abrogation of the Japan-U.S. security treaty and paid tribute to Emperor Hirohito.

The group recognized Keidanren's role in Japan's starting post-war recovery but claimed the rapid economic growth corrupted the society, caused pollution and destroyed traditional values.

The resurgence of rightist activism is sure to revive a sporadic debate over the resillience of Japan's democracy. The small but highly visible ultra-rightists keep alive a controversy over whether dormant militarism is a potential threat here.

In an incident that ended without violence, the ultra-rightists succeeded in putting their views on the front-page of every newspaper in Japan and television coverage was equally full. The hostages all said they were well-treated and their captors talked with calm and persuasive determination in the interviews.

Many of the rightists' comments on the problems of rapid economic growth struck a chord with a large number of Japanese people who share the same concerns.

Observers also noted that in their objections to high economic growth and the security treaty, the extreme political groups of Japan's far left and the far right are in agreement, though for contradictory reasons.