Los Angeles Times correspondent Robert C. Toth was told today that a KGB security police investigation of him had been completed and that he would now be permitted to leave the country.

Since his seizure on a downtown street Saturday morning, Toth's life had become a nightmare of official Soviet allegations that he was collecting state secrets and sessions of KGB interrogation concerning his work and contacts here. There was considerable relief among Americans in Moscow today that the ordeal for Toth and his family ended.

President Carter's expressions of concern on Toth's behalf had elevated the case into a potentially major test of U.S.-Soviet relations. The Kremlin must have recognized that placing an American journalist in such jeopardy would be regarded in Washington as a very serious matter.

[In Washington, President Carter's national security adviser, Zbigniew Brzezinski, said that in addition to Carter's statement the United States had made "other formal contacts" with the Soviets on Toth's behald, warning that keeping him in the Soviet Union would caue problems. Asked what problems, Brzezinski said, "We left that up to their imagination."]

[Brzezinski said the "most plausible explanation" of the Soviet action was "They weren't very smart." He said he was not sure at what level the decision to interrogate Toth was made, but once it had begun, the decision to continue "had to be from the top."]

Although Toth's release means that he will be leaving Moscow Friday, as he had originally planned, the fact remains that he was subjected to about 14 hours of KGB questioning. As Toth put it this afternoon, the affair was an "Object lesson" to Western reporters of what autorities here can do to them.

Toth said his interrogation was also meant as a warning to Russians, such as his friend jailed dissident Anatoly Scharansky, to beware of dealing with Western Journalists.

"They are saying, "Correspondents provide you with no protection," Toth explained, "because the correspondents have none."

The Toth affair, a symptom of the current general stain in Soviet-American ties, is one of Moscow's ways of shoowing defiance of president Careter's support of human-rights activists because American journalists here supply much of the available information on Soviet treatment of dissidents.

The case is also seen here as part of the internal Soviet ideological crackdown this year, designed to eliminate the relatively easy access dissidents had to weatern public opinion. Among other moves, the government has imprisoned nine members of a group set up to monitor Kremlin compliance with human-rights provisions of the Helsinki accords or European security.

Scharansky is one of the nine. The 29-year-old computer programmer was a spokesman for the group and for Jews who had been refused permission to emigrate. His family has been told that he is being held on a treason charge, the questioning of Toth may be part of the KGB effort to substantiate that allegation.

During two interrogation sessions yesterday, KGB officers probed Toth's relationship with Scharansky, placing particular emphasis on how the dissident had helped the correspondent obtain material for science stories. Toth wrote on such subjects as genetic engineering, sociology and how seemingly ordinary Soviet facilities are used for secret purposes.

Much of yesterday's nearly seven hours of questioning had to do with Toth's refusal to sign a "protocol," or summary of the interrogtion. He did not want to sign it because he does not know enough Russian to read the document. It was this refusal, he later said, that seemed to agitate the KGB officers most. Finally he signed, making it clear tht he was doing so under dures.

The insistence on this point probably means that the Soviets intend to use Toth's signed acknowledgement that Scharansky had helped him collect material for stories as evidence at the treason trial if one is held. But Toth stressed to his questioners that there was nothing with Scharansky was meant only for publication as newspaper stories.

The initial pretext for detaining Toth, who had planned to leave Friday on a trip across Siberia with his family before departing for home at the end of a three-year Moscow tour, was that he had been caught receiving "secret" papers on the street from a Soviet scientist. That incident was the basis of two rounds of questioning and then was dropped altogether.

Toth said he is now convinced that the KGB used the scientist, Valery Pestyukov, to trap him. Pestyukov, had just handed Toth an arden, he had written on parap sychology When po lice seized them both.

After yesterday's second [WORD ILLEGIBLE] the interrogators refused to [WORD ILLEGIBLE] what would happen next [WORD ILLEGIBLE] ing a KGB colonel called to [WORD ILLEGIBLE] questioning of the correspondent [WORD ILLEGIBLE] over and he could leave [WORD ILLEGIBLE] Ministry later made it clear [WORD ILLEGIBLE] was not being expelled.

An expulsion would have [WORD ILLEGIBLE] American retaliation [WORD ILLEGIBLE] dated Press reporter [WORD ILLEGIBLE] was kicked out earlier this [WORD ILLEGIBLE] State Department immediately ordered a Tass reporter to leave [WORD ILLEGIBLE] inton.

This evening, the Toth [WORD ILLEGIBLE] with friends and fellow correspondents. Toth's wife, Paula, said [WORD ILLEGIBLE] when they called off plans for [WORD ILLEGIBLE] Siberian trip Tuesday after being ordered to remain in Moscow, [WORD ILLEGIBLE] the Soviet travel agency, made them pay a 25 per cent cancellation fee. The family now intends to fly directly to London.