A man accused by Britain in July of spying for the Soviet Union for nine years may have done more damage to western intelligence than any Russian operative since H.A.R. (Kim) Philby defected to Moscow in 1963, U.S. intelligence sources said yesterday.

Geoffrey Arthur Prime, 44, a translator of coded Russian radio traffic at Britain's top-secret electronics communications center at Cheltenham in western England, is believed to have compromised North Atlantic Treaty Organization code-breaking and secret-gathering techniques, the sources said.

He is also thought to have told the Soviets the locations of all British and U.S. nuclear warheads and the day-by-day armed readiness of every division deployed throughout the 13 NATO countries of western Europe, Turkey and Greece, the sources said.

"Prime had from 1968 to 1977 the highest secret clearance in NATO, a clearance called 'Cosmic,' " one U.S. intelligence official said yesterday. "He had access to as many top secrets as anybody in NATO." Arrested in July on espionage charges that a British prosecutor described as being "of the gravest possible nature," Prime is expected to stand trial late next month.

Details of his arrest have not been revealed in Great Britain because of restrictions imposed by Britain's Official Secrets Act, but The New York Times reported yesterday on the charges expected to be placed against Prime when he stands trial.

"What we are concerned about is whether or not our national security is at risk," Labor Party member of Parliament Ted Leadbitter said yesterday in London. He urged Prime Minister Margaret Thatcher to tell Parliament how Prime was able to use the top-secret electronics center at Cheltenham for one of the deepest-known penetrations of western intelligence since Philby's work for the Soviets during and after World War II.

Like most Britons, Leadbitter learned details of the charges against Prime from The New York Times report. Not only does the Official Secrets Act prohibit publication of details on espionage cases, but British law also forbids disclosure of details about criminal cases not yet brought to trial.

Prime was first arrested on an unrelated charge of molesting children, then arraigned on the espionage charge. Washington Post correspondent Peter Osnos reported yesterday from London that British prosecutors hoped they might avoid a spy trial by getting Prime to plead guilty to the sex charge. But that has not been resolved, Osnos reported.

The Cheltenham communications center where Prime worked is operated by Britain's Government Communication Headquarters and the U.S. National Security Agency. Cheltenham is the British equivalent of NSA's top-secret code-breaking and electronic information-gathering nerve center at Fort Meade.

Prime is said to have had access to tape recordings and transcripts of all intercepted Soviet telephone, radio and satellite communications, intelligence sources reported.

With such access, Prime would have been able to tell the Soviets which of their codes had been broken, how they were broken and by whom they were broken, the sources said. He also is thought to have fed false information about Soviet codes to British and American code-breakers, which deceived western intelligence experts between 1968 and 1977 but also led to his arrest on espionage charges, the sources said.

The sources would not describe how Prime gained such access and the events leading to his arrest.

At the time of his arrest, sources said, Britain and the United States were forced to change many of their secret codes overnight at great expense to both nations.

One U.S. intelligence source said Prime fed the Soviets what NATO officials call the "red-line numbers" of NATO military strength: what equipment was ready and on-line and what equipment was off-line being repaired or replaced.

"He also identified clandestine NATO agents to the Russians," one source disclosed. "He was also telling them which of our people had access to their secret information. That was extremely damaging for a while, believe me."

It is not clear whether such disclosures led to the arrest of any agents.

Prime also is believed to have informed the Soviets of the NATO "force structure" throughout western Europe: which divisions carried nuclear warheads, which divisions were protected against gas attack and which on-line divisions were under or at strength, the sources said.

The New York Times said Prime had been recruited by the Soviets in the early 1960s, when he was stationed with the Royal Air Force in West Berlin. One intelligence source told The Washington Post that Prime was a "committed" Soviet agent, spying for the Soviets for ideological reasons.

Philby was recruited as a Soviet spy in 1933 and served as a clandestine agent in British intelligence and as a security liaison officer in the United States.