A Harvard astronomer turned sleuth helped crack an international electronic spy ring in West Germany by tracking down the "hacker" who broke into his computer files.

For more than six months, finding the computer snoop was a lonely obsession for 38-year-old Clifford Stoll, who initially was unable to convince the FBI to investigate the computer break-in.On Thursday, a West German official announced the arrests of three hackers who allegedly acquired sensitive military computer passwords and codes and sold them to the Soviets. The Pentagon has not determined the extent of the damage to U.S. security.

"I would say (Stoll) was largely responsible for cracking the case," said Charles S. Hurley, former spokesman for the Lawrence Berkeley Laboratory in Berkeley, Calif., where Stoll once worked. "Over a period of many months, he tracked them."

It all started with a 75-cent accounting error that Stoll noticed in the California laboratory's shared-time computer system accounts in August 1986.

"If it had been $1,000 off, I wouldn't have thought anything of it," Stoll said Thursday. "It's like, if your house collapses, you just assume there's been an earthquake. But if you find a tiny termite hole, you think, `Geez, I'd better investigate.' It's the little problems that are the most fascinating."

Stoll, a computer expert with a doctorate in astronomy from the University of Arizona, searched for clues for three days and discovered the error was caused by someone who had gained access to the computer through telephone lines. "For four months, I did absolutely nothing but watch what he typed in," he said.

Stoll said it became apparent that the hacker was trying to use the Berkeley Laboratory's computer as a gateway to the so-called Milnet, a computer network linking defense plants, university labs and military installations.

"He was searching for key words like nuclear, ICBM, SDI, biological warfare, Norad. He was reading everything he could get his hands on, and then it turns out he was selling it to the Soviets," Stoll said.

He said he told the FBI about the hacker in the late summer of 1986, but there wasn't much of a response.

Stoll said his girlfriend, tired of his electronic pager that would beep whenever the hacker got onto the system, was responsible for the big break in the case. She suggested that he lay a trap.

He created bogus military data and a fictitious computer network called "SDI Net." The hacker took the bait, spending two hours reading through the material, giving Stoll enough time to trace the call to Hanover, West Germany.

Three months later, Stoll said, he got a letter from a man in Pittsburgh asking for information about SDI Net. When he turned that letter over to the FBI in April 1987, he said, the bureau found the man had connections to Eastern European governments and immediately began an investigation.

In all, Stoll said the spy ring had attempted to break into about 450 different computers and succeeded in stealing information from more than 40 of them - including data systems at the Pentagon, defense contracting firms and U.S. military bases around the world.

Stoll now has a contract from Doubleday Inc. to write a book about his not-so-amateur sleuthing.

But he said he is glad the case is nearing an end so he can get back to work at the Harvard-Smithsonian Astrophysical Observatory in Cambridge, Mass.

"In one sense, it was exciting," he said. "In another sense, it was dreadful, because I got zero astronomy done for two years."