Japan made secret deals with Sweden during World War II to buy much-needed war materiel and with Sweden and Switzerland to maintain espionage networks in both neutral countries.

The secret purchases from Sweden involved first ball bearings and then piano wire that could be fabricated into ball bearings. Both the bearings and the wire traveled from Sweden to Germany, Italy and occupied France, where they were picked up and taken to Japan by submarine to avoid British and American warships and aircraft.

These moves are revealed in oncesecret documents turned over to the National Archives by the National Security Agency, whose World War II predecessor (the Signal Security Service) had broken the Japanese diplomatic code as long ago as 1938 without Japanese knowledge.

The documents show that in August 1943 the Swedish Foreign Office advised the U.S. minister to Sweden that "no further licenses would be granted for Swedish exports to Japan and that licenses already issued had been or would be revoked." In fact, the documents go on, Japan continued buying goods from Sweden, especially piano wire to convert to ball bearings.

On Nov. 25, 1943, 15 tons of piano wire was shipped from Sweden to Japan, the first shipment in a 70-ton order. A message from the Japanese military attache in Stockholm said: "We have received an export order for the rest and we expect to ship it early in January."

In December 1943, the Japanese military attache in Berlin told Tokyo: "We expect to purchase 120 tons of piano wire in Sweden very shortly, and a large portion of the wire will be delivered this month."

Late in 1944, when it appeared that Axis allies like Hungary, Romania and Bulgaria would fall to the advance of the Russian Army and that once-pro-Axis countries like Spain might switch allegiance, Japan moved to establish intelligence networks in Sweden and Switzerland to make up the difference. At no time did Sweden or Switzerland object to the moves when the Japanese broached them.

On Oct. 6, 1944, according to the documents released to the Archives, the Japanese cabinet authorized a consulate general with a staff of six to set up an office in Zurich. At the same time, Tokyo authorized the military attache in Berne to add five to his staff and suggested that a Red Cross representative be moved to Geneva "to collect intelligence and observe the general situation."

In August 1944, the Japanese Foreign Ministry transferred from Lisbon to Stockholm the task of "collecting newspaper intelligence," which in part involved using foreign journalists as paid agents. A month later, at least two Japanese military attaches whose real roles included espionage moved from the European continent to Stockholm. The Swedish army and Foreign Ministry "made no objection," according to the documents.

At least some of the Japenese nationals who moved to Sweden were used as couriers to carry to Germany the piano wire Japan was buying from Sweden. The Archives documents say that every month these couriers carried out of Sweden as much as 140 pounds of piano wire, which was being used in Japan for guide, bracing and support wire in aircraft as well as for ball bearings.

Japan also was making regular purchases of steel ball and roller bearings from Sweden. In September and October 1944 alone, Japan bought 370,000 steel balls from Sweden and by Nov. 17 1944, the Japanese military attache said: "We have now in our custody 600,000 steel balls and have ordered 350,000 more for delivery in January.

"We have arranged to obtain another 200,000 kronor worth of balls," the military attache in Stockholm went on in his cable to Tokyo. "but are postponing our final decision. Please send instructions to Berlin on getting these items from Sweden to Germany and then to Japan." Shipment to Japan was invariably by submarine, which carried goods from Europe once or twice a month by secret routes.