The government said Friday it dealt a "major blow" to the KGB by cracking a spy ring that reportedly gave the Soviets direct access to key military and research computers in the West.

A West German television network on Thursday said the spy ring acquired passwords, codes and other information from computers in the United States, Western Europe and Japan.West German prosecutors said three people were arrested and five others were under investigation. A second TV network in West Germany reported that at least 10 computer hackers were involved in the spy ring.

The Norddeutsche Rundfunk broadcasting network said the ring gained access to the U.S. Defense Department's general data bank, known as Optimus; a NASA and a "Star Wars" research computer; and computers tied to nuclear weapons and energy research at the Los Alamos National Laboratory in New Mexico and the Fermi National Accelerator Laboratory in Illinois.

The network said attempts were made to gain access to the Lawrence Berkeley Laboratory at the University of California, which it called a key link in efforts to break into other U.S. computers.

Clifford Stoll, an astrophysicist who did research at the laboratory, said up to 50 military computers were broken into through an astronomy computer but that the hacker did not have passwords for classified information.

"We were amazed! Here's some guy breaking into an astronomy computer in Berkeley, reaching out into military computers trying to search for information about SDI (the Strategic Defense Initiative, known as "Star Wars"), about nuclear warheads," Stoll said Thursday from his home in Cambridge, Mass.

Stoll, who works at the Smithsonian Astrophysical Observatory at Harvard University, said he and other researchers helped break the ring by providing false information (see A2). He said someone linked to East bloc groups wrote the laboratory asking for related information, leading authorities to crack the ring. He did not elaborate.

Alexander Prechtel, spokesman for the Federal Prosecutor's Office in Karlsruhe, said police in Hanover arrested two computer hackers on "suspicion of espionage activities for an Eastern European intelligence agency." Another suspect was arrested in West Berlin, he said. Five others were under investigation.

"They are suspected of breaking into foreign computer systems" and selling information to communist agents, Prechtel said.

Roland Bachmeier, spokesman for the federal Interior Ministry, said information was provided to Soviet intelligence but declined to elaborate.

"This has succeeded in dealing a major blow against the KGB Soviet secret service," Interior Minister Friedrich Zimmermann said.

Norddeutsche Rundfunk said the computer hackers, acting at the bidding of Soviet agents, gained access to a U.S. Defense Department computer and important research and business computers elsewhere.

The hackers obtained sensitive information that would allow the Soviets themselves to gain access to the computers and develop technology based on the information.

The information would also give the Kremlin access to U.S. military supply depot statistics and to computers belonging to several European institutes that deal with atomic and aerospace research, it said.

Norddeutsche Runkfunk said the three were detained following searches of their apartments. ZDF television said they "belonged to a hard core of 10 hackers."